diff options
author | Eduardo Julian | 2021-07-18 23:10:18 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-18 23:10:18 -0400 |
commit | a40f40f230e6312ae432f06e7f73aa5945d8fa49 (patch) | |
tree | 5005ef744b01f9327c2e4df23146928f1723c495 /stdlib/source/test/lux.lux | |
parent | 442d1557b879a8a4bd76f441f72a17bfb71cf05f (diff) |
New JVM compiler can now compile JVM interfaces.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux.lux | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 1e9976f4e..dffa24069 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -277,16 +277,20 @@ false)) ))) -(interface: (Returner a) +(/.interface: (Returner a) (: (-> Any a) return)) -(implementation: (global_returner value) +(/.implementation: (global_returner value) (All [a] (-> a (Returner a))) (def: (return _) value)) +(def: static_return 123) + +(/.open: "global\." (..global_returner ..static_return)) + (def: for_interface Test (do random.monad @@ -301,6 +305,13 @@ (n.= expected (\ (global_returner expected) return []))) (_.cover [/.implementation] (n.= expected (\ local_returner return []))) + (_.cover [/.open:] + (n.= static_return (global\return []))) + (_.cover [/.^open] + (let [(/.^open "local\.") local_returner] + (n.= expected (local\return [])))) + (_.cover [/.\] + (n.= expected (/.\ local_returner return []))) )))) (def: for_module @@ -587,6 +598,27 @@ false))) ))) +(def: option/0 "0") +(def: option/1 "1") +(def: static_char "@") + +(def: for_static + Test + (do random.monad + [sample (random.either (wrap option/0) + (wrap option/1))] + ($_ _.and + (_.cover [/.static] + (case sample + (^ (/.static option/0)) true + (^ (/.static option/1)) true + _ false)) + (_.cover [/.char] + (|> (`` (/.char (~~ (/.static static_char)))) + text.from_code + (text\= static_char))) + ))) + (def: test Test (<| (_.covering /._) @@ -612,6 +644,7 @@ ..for_i64 ..for_function ..for_template + ..for_static ..sub_tests ))) |