]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/ole32/ole32-tests.factor
windows.ole32: use sets in tests.
[factor.git] / basis / windows / ole32 / ole32-tests.factor
index ecd25738b1569516ff3f296fc7a1e928f283d3c0..83314efce92d7c48f116309a3072d83a9a7090e0 100644 (file)
@@ -1,4 +1,7 @@
-USING: kernel tools.test windows.ole32 alien.c-types ;
+USING: alien.c-types classes.struct kernel math sequences
+sets specialized-arrays tools.test windows.com.syntax
+windows.kernel32 windows.ole32 ;
+SPECIALIZED-ARRAY: uchar
 IN: windows.ole32.tests
 
 [ t ] [
@@ -6,31 +9,25 @@ IN: windows.ole32.tests
     "{01234567-89ab-cdef-0123-456789abcdef}" string>guid
     guid=
 ] unit-test
-        
+
 [ f ] [
     "{76543210-89ab-cdef-0123-456789abcdef}" string>guid
     "{01234567-89ab-cdef-0123-456789abcdef}" string>guid
     guid=
 ] unit-test
-        
+
 [ f ] [
     "{01234567-89ab-cdef-0123-fedcba987654}" string>guid
     "{01234567-89ab-cdef-0123-456789abcdef}" string>guid
     guid=
 ] unit-test
-        
-little-endian?
-[ B{
-    HEX: 67 HEX: 45 HEX: 23 HEX: 01 HEX: ab HEX: 89 HEX: ef HEX: cd
-    HEX: 01 HEX: 23 HEX: 45 HEX: 67 HEX: 89 HEX: ab HEX: cd HEX: ef
-} ]
-[ B{
-    HEX: 01 HEX: 23 HEX: 45 HEX: 67 HEX: 89 HEX: ab HEX: cd HEX: ef
-    HEX: 01 HEX: 23 HEX: 45 HEX: 67 HEX: 89 HEX: ab HEX: cd HEX: ef
-} ] ?
-[ "{01234567-89ab-cdef-0123-456789abcdef}" string>guid ]
-unit-test
+
+[
+    GUID: 01234567-89ab-cdef-0123-456789abcdef}
+] [ "{01234567-89ab-cdef-0123-456789abcdef}" string>guid ] unit-test
 
 [ "{01234567-89ab-cdef-0123-456789abcdef}" ]
 [ "{01234567-89ab-cdef-0123-456789abcdef}" string>guid guid>string ]
 unit-test
+
+{ 0 } [ 10 [ create-guid ] replicate duplicates length ] unit-test