]> gitweb.factorcode.org Git - factor.git/blob - basis/windows/ole32/ole32-tests.factor
windows.ole32: add create-guid
[factor.git] / basis / windows / ole32 / ole32-tests.factor
1 USING: alien.c-types classes.struct kernel math sequences
2 specialized-arrays
3 specialized-arrays.instances.alien.c-types.uchar tools.test
4 windows.com.syntax windows.kernel32 windows.ole32 ;
5 SPECIALIZED-ARRAY: uchar
6 IN: windows.ole32.tests
7
8 [ t ] [
9     "{01234567-89ab-cdef-0123-456789abcdef}" string>guid
10     "{01234567-89ab-cdef-0123-456789abcdef}" string>guid
11     guid=
12 ] unit-test
13
14 [ f ] [
15     "{76543210-89ab-cdef-0123-456789abcdef}" string>guid
16     "{01234567-89ab-cdef-0123-456789abcdef}" string>guid
17     guid=
18 ] unit-test
19
20 [ f ] [
21     "{01234567-89ab-cdef-0123-fedcba987654}" string>guid
22     "{01234567-89ab-cdef-0123-456789abcdef}" string>guid
23     guid=
24 ] unit-test
25
26 [
27     GUID: 01234567-89ab-cdef-0123-456789abcdef}
28 ] [ "{01234567-89ab-cdef-0123-456789abcdef}" string>guid ] unit-test
29
30 [ "{01234567-89ab-cdef-0123-456789abcdef}" ]
31 [ "{01234567-89ab-cdef-0123-456789abcdef}" string>guid guid>string ]
32 unit-test
33
34 { 0 } [ 10 [ create-guid ] replicate duplicates length ] unit-test