]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/cocoa/cocoa-tests.factor
stomp.cli: simplify
[factor.git] / basis / cocoa / cocoa-tests.factor
index 59924bc80352ae68ae623087e653ccd9918afd3e..8b661b908d41681e1f0e05f728da1285e1dc02e9 100644 (file)
@@ -1,15 +1,13 @@
-USING: alien.c-types cocoa cocoa.messages cocoa.subclassing
-cocoa.types compiler.test kernel namespaces cocoa.classes
-cocoa.runtime tools.test memory compiler.units math
-core-graphics.types ;
+USING: alien.c-types cocoa cocoa.classes cocoa.subclassing
+cocoa.types compiler.test core-graphics.types kernel math memory
+namespaces tools.test ;
 IN: cocoa.tests
 
-CLASS: Foo < NSObject
-[
+<CLASS: Foo < NSObject
     METHOD: void foo: NSRect rect [
         gc rect "x" set
-    ]
-]
+    ] ;
+;CLASS>
 
 : test-foo ( -- )
     Foo -> alloc -> init
@@ -23,10 +21,9 @@ CLASS: Foo < NSObject
 { 101.0 } [ "x" get CGRect-w ] unit-test
 { 102.0 } [ "x" get CGRect-h ] unit-test
 
-CLASS: Bar < NSObject
-[
-    METHOD: NSRect bar [ test-foo "x" get ]
-]
+<CLASS: Bar < NSObject
+    METHOD: NSRect bar [ test-foo "x" get ] ;
+;CLASS>
 
 { } [
     Bar [
@@ -42,12 +39,11 @@ CLASS: Bar < NSObject
 { 102.0 } [ "x" get CGRect-h ] unit-test
 
 ! Make sure that we can add methods
-CLASS: Bar < NSObject
-[
-    METHOD: NSRect bar [ test-foo "x" get ]
+<CLASS: Bar < NSObject
+    METHOD: NSRect bar [ test-foo "x" get ] ;
 
-    METHOD: int babb: int x [ x sq ]
-]
+    METHOD: int babb: int x [ x sq ] ;
+;CLASS>
 
 { 144 } [
     Bar [