Issue 1829: testIndenting: remove/fix? since rely on the current font

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 1829: testIndenting: remove/fix? since rely on the current font

Stéphane Ducasse
Help me taking decision :)

Stef

http://code.google.com/p/pharo/issues/detail?id=1829

testSetUp
        "just reminding us all what the paragraph looks like to begin with. assuming Accuny12 font "
        | cb |

       
        cb := para characterBlockForIndex: 1.  "p"
        self assert: cb top = 0.
        self assert: cb left = 0.
        self assert: cb right = 7.
       
       
        cb := para characterBlockForIndex: 2.  "the tab"
        self assert: cb top = 0.
        self assert: cb left = 7.
        self assert: cb right = 24.

       
        cb := para characterBlockForIndex: 3.  "w"
        self assert: cb top = 0.
        self assert: cb left = 24.
        self assert: cb right = 34.
       
        cb := para characterBlockForIndex: 7.  " " "between word and word"
        self assert: cb top = 0.
        self assert: cb left = 52.
        self assert: cb right = 57.
       
        cb := para characterBlockForIndex: 11.  "d" "last char"
        self assert: cb top = 0.
        self assert: cb left = 79.
        self assert: cb right = 85.
       
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Issue 1829: testIndenting: remove/fix? since rely on the current font

Adrian Lienhard
Yes, I would remove it. Tests that rely on the current font or similar user settings are just a bad idea because they fail in unexpected ways.

Adrian

On Jan 16, 2010, at 10:33 , Stéphane Ducasse wrote:

> Help me taking decision :)
>
> Stef
>
> http://code.google.com/p/pharo/issues/detail?id=1829
>
> testSetUp
> "just reminding us all what the paragraph looks like to begin with. assuming Accuny12 font "
> | cb |
>
>
> cb := para characterBlockForIndex: 1.  "p"
> self assert: cb top = 0.
> self assert: cb left = 0.
> self assert: cb right = 7.
>
>
> cb := para characterBlockForIndex: 2.  "the tab"
> self assert: cb top = 0.
> self assert: cb left = 7.
> self assert: cb right = 24.
>
>
> cb := para characterBlockForIndex: 3.  "w"
> self assert: cb top = 0.
> self assert: cb left = 24.
> self assert: cb right = 34.
>
> cb := para characterBlockForIndex: 7.  " " "between word and word"
> self assert: cb top = 0.
> self assert: cb left = 52.
> self assert: cb right = 57.
>
> cb := para characterBlockForIndex: 11.  "d" "last char"
> self assert: cb top = 0.
> self assert: cb left = 79.
> self assert: cb right = 85.
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Issue 1829: testIndenting: remove/fix? since rely on the current font

Stéphane Ducasse
Yeahhhhhh in the next batch!

On Jan 16, 2010, at 12:28 PM, Adrian Lienhard wrote:

> Yes, I would remove it. Tests that rely on the current font or similar user settings are just a bad idea because they fail in unexpected ways.
>
> Adrian
>
> On Jan 16, 2010, at 10:33 , Stéphane Ducasse wrote:
>
>> Help me taking decision :)
>>
>> Stef
>>
>> http://code.google.com/p/pharo/issues/detail?id=1829
>>
>> testSetUp
>> "just reminding us all what the paragraph looks like to begin with. assuming Accuny12 font "
>> | cb |
>>
>>
>> cb := para characterBlockForIndex: 1.  "p"
>> self assert: cb top = 0.
>> self assert: cb left = 0.
>> self assert: cb right = 7.
>>
>>
>> cb := para characterBlockForIndex: 2.  "the tab"
>> self assert: cb top = 0.
>> self assert: cb left = 7.
>> self assert: cb right = 24.
>>
>>
>> cb := para characterBlockForIndex: 3.  "w"
>> self assert: cb top = 0.
>> self assert: cb left = 24.
>> self assert: cb right = 34.
>>
>> cb := para characterBlockForIndex: 7.  " " "between word and word"
>> self assert: cb top = 0.
>> self assert: cb left = 52.
>> self assert: cb right = 57.
>>
>> cb := para characterBlockForIndex: 11.  "d" "last char"
>> self assert: cb top = 0.
>> self assert: cb left = 79.
>> self assert: cb right = 85.
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project