diff options
author | Eduardo Julian | 2019-07-25 00:45:51 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-07-25 00:45:51 -0400 |
commit | 78fd01f7e6688448bbd710336d4d7b1c35ae058a (patch) | |
tree | c318b6dc47a20dfabf51c9d920fa8e8fd7cdd6f1 /stdlib/source/test/lux/host.jvm.lux | |
parent | 6425e4cfe470b54d76bb316cbdb6fdb21dd63130 (diff) |
No more "i/"-prefixed functions.
Diffstat (limited to 'stdlib/source/test/lux/host.jvm.lux')
-rw-r--r-- | stdlib/source/test/lux/host.jvm.lux | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/stdlib/source/test/lux/host.jvm.lux b/stdlib/source/test/lux/host.jvm.lux index f142a1912..d1753e7a1 100644 --- a/stdlib/source/test/lux/host.jvm.lux +++ b/stdlib/source/test/lux/host.jvm.lux @@ -4,7 +4,9 @@ [control pipe] [data - ["." text ("#;." equivalence)]] + ["." text ("#;." equivalence)] + [number + ["i" int]]] [math ["r" random]] ["_" test (#+ Test)]] @@ -30,35 +32,38 @@ (#static currentTimeMillis [] #io long) (#static getenv [java/lang/String] #io #? java/lang/String)) -(class: #final (TestClass A) [java/lang/Runnable] - ## Fields - (#private foo boolean) - (#private bar A) - (#private baz java/lang/Object) - ## Methods - (#public [] (new self {value A}) [] - (exec (:= ::foo #1) - (:= ::bar value) - (:= ::baz "") - [])) - (#public (virtual self) java/lang/Object - "") - (#public #static (static) java/lang/Object - "") - (java/lang/Runnable [] (run self) void - [])) +## TODO: Handle "class:" ASAP. +## (class: #final (TestClass A) [java/lang/Runnable] +## ## Fields +## (#private foo boolean) +## (#private bar A) +## (#private baz java/lang/Object) +## ## Methods +## (#public [] (new self {value A}) [] +## (exec (:= ::foo #1) +## (:= ::bar value) +## (:= ::baz "") +## [])) +## (#public (virtual self) java/lang/Object +## "") +## (#public #static (static) java/lang/Object +## "") +## (java/lang/Runnable [] (run self) void +## [])) (def: test-runnable (object [] [java/lang/Runnable] [] - (java/lang/Runnable [] (run self) void - []))) + (java/lang/Runnable + [] (run self) void + []))) (def: test-callable (object [a] [(java/util/concurrent/Callable a)] [] - (java/util/concurrent/Callable [] (call self) a - (undefined)))) + ((java/util/concurrent/Callable a) + [] (call self) a #throws [java/lang/Exception] + (undefined)))) (interface: TestInterface ([] foo [boolean java/lang/String] void #throws [java/lang/Exception])) @@ -70,9 +75,9 @@ (`` ($_ _.and (~~ (template [<to> <from> <message>] [(_.test <message> - (or (|> sample <to> <from> (i/= sample)) + (or (|> sample <to> <from> (i.= sample)) (let [capped-sample (|> sample <to> <from>)] - (|> capped-sample <to> <from> (i/= capped-sample)))))] + (|> capped-sample <to> <from> (i.= capped-sample)))))] [/.long-to-byte /.byte-to-long "Can succesfully convert to/from byte."] [/.long-to-short /.short-to-long "Can succesfully convert to/from short."] @@ -126,7 +131,7 @@ (_.test "Can set and get array values." (let [arr (/.array Long size)] (exec (/.array-write idx value arr) - (i/= value (/.array-read idx arr)))))))) + (i.= value (/.array-read idx arr)))))))) (def: #export test ($_ _.and |