About UUID test

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

About UUID test

stéphane ducasse-2
hi john

do you have any idea how to solve the test

testCreationRandom
        | uuid |

        (UUID new asString last: 12) = (UUID new asString last: 12) ifTrue:  
[^self].
        1000 timesRepeat:
                [uuid _ UUID new.
                self should: [((uuid at: 7) bitAnd: 16rF0) = 16r40].
                self should: [((uuid at: 9) bitAnd: 16rC0) = 16r80]]


I do not understand
this line exactly
        ((uuid at: 7) bitAnd: 16rF0) = 16r40

I would like to start cleaning all the tests in 3.9 and only ship a  
green image.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: About UUID test

Cees De Groot
On 2/6/06, stéphane ducasse <[hidden email]> wrote:
> I do not understand
> this line exactly
>         ((uuid at: 7) bitAnd: 16rF0) = 16r40
>
I think that's a test for compliance with the various UUID type
indicators. A UUID can be created from host id + timestamp + counter,
or from a random number, and I think the original DCE spec had a third
method (http://www.opengroup.org/onlinepubs/9629399/apdxa.htm for
example). So the UUID isn't simply a random byte string, there are
some interpretable fields in there.

> I would like to start cleaning all the tests in 3.9 and only ship a
> green image.

Hear, hear!
Reply | Threaded
Open this post in threaded view
|

Re: About UUID test

Marcus Denker
In reply to this post by stéphane ducasse-2
Hi,

I just checked on here, and the test is green (6720). The VM I use is  
3.8.9beta8

     Marcus

On 06.02.2006, at 09:26, stéphane ducasse wrote:

> hi john
>
> do you have any idea how to solve the test
>
> testCreationRandom
> | uuid |
>
> (UUID new asString last: 12) = (UUID new asString last: 12)  
> ifTrue: [^self].
> 1000 timesRepeat:
> [uuid _ UUID new.
> self should: [((uuid at: 7) bitAnd: 16rF0) = 16r40].
> self should: [((uuid at: 9) bitAnd: 16rC0) = 16r80]]
>
>
> I do not understand
> this line exactly
> ((uuid at: 7) bitAnd: 16rF0) = 16r40
>
> I would like to start cleaning all the tests in 3.9 and only ship a  
> green image.
>
> Stef

Reply | Threaded
Open this post in threaded view
|

Re: About UUID test

stéphane ducasse-2

On 6 févr. 06, at 18:24, Marcus Denker wrote:
> Hi,
>
> I just checked on here, and the test is green (6720). The VM I use  
> is 3.8.9beta8

on PC the test is red :)

Stef