diff options
Diffstat (limited to 'stdlib/source/test/lux/ffi.js.lux')
-rw-r--r-- | stdlib/source/test/lux/ffi.js.lux | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux index e015ea5e8..d1ab5636a 100644 --- a/stdlib/source/test/lux/ffi.js.lux +++ b/stdlib/source/test/lux/ffi.js.lux @@ -58,91 +58,91 @@ ... I64s get compiled as JavaScript objects with a specific structure. object random.nat] (<| (_.covering /._) - (`` ($_ _.and - (~~ (template [<type> <value>] - [(_.cover [<type>] - (exec - (is <type> <value>) - true))] + (`` (all _.and + (~~ (template [<type> <value>] + [(_.cover [<type>] + (exec + (is <type> <value>) + true))] - [/.Boolean boolean] - [/.Number number] - [/.String string] - )) - (_.for [/.Object] - ($_ _.and - (~~ (template [<type>] - [(_.cover [<type>] - (exec - (is (Ex (_ a) (/.Object a)) - (is <type> - (as_expected []))) - true))] + [/.Boolean boolean] + [/.Number number] + [/.String string] + )) + (_.for [/.Object] + (all _.and + (~~ (template [<type>] + [(_.cover [<type>] + (exec + (is (Ex (_ a) (/.Object a)) + (is <type> + (as_expected []))) + true))] - [/.Function] - [/.Symbol] - [/.Null] - [/.Undefined] - )) - )) - (_.cover [/.null] - (exec - (is Nat (/.null [])) - (is Text (/.null [])) - (is (All (_ a) (-> a a)) (/.null [])) - true)) - (_.cover [/.null?] - (and (/.null? (/.null [])) - (not (/.null? 0)) - (not (/.null? "0")) - (not (/.null? (|>>))))) - (_.cover [/.global] - (|> (/.global /.Function [parseFloat]) - "js object null?" - not)) - (_.cover [/.function] - (|> (/.function (_ [input/0 Nat]) - Int - (.int input/0)) - "js object null?" - not)) - (_.cover [/.on_browser? /.on_node_js? /.on_nashorn?] - (and (or /.on_nashorn? - /.on_node_js? - /.on_browser?) - (bit#= /.on_nashorn? - (not (or /.on_node_js? - /.on_browser?))) - (bit#= /.on_node_js? - (not (or /.on_nashorn? - /.on_browser?))) - (bit#= /.on_browser? - (not (or /.on_nashorn? - /.on_node_js?))))) - (_.cover [/.type_of] - (and (text#= "boolean" (/.type_of boolean)) - (text#= "number" (/.type_of number)) - (text#= "string" (/.type_of string)) - (text#= "function" (/.type_of function)) - (text#= "object" (/.type_of object)))) - (_.cover [/.import:] - (let [encoding "utf8"] - (text#= string - (cond /.on_nashorn? - (let [binary (java/lang/String::getBytes encoding (as java/lang/String string))] - (|> (java/lang/String::new binary encoding) - (as Text))) - - /.on_node_js? - (|> (Buffer::from string encoding) - (Buffer::toString encoding)) - - ... On the browser - (let [binary (|> (TextEncoder::new encoding) - (TextEncoder::encode string))] - (|> (TextDecoder::new encoding) - (TextDecoder::decode binary))) - )))) + [/.Function] + [/.Symbol] + [/.Null] + [/.Undefined] + )) + )) + (_.cover [/.null] + (exec + (is Nat (/.null [])) + (is Text (/.null [])) + (is (All (_ a) (-> a a)) (/.null [])) + true)) + (_.cover [/.null?] + (and (/.null? (/.null [])) + (not (/.null? 0)) + (not (/.null? "0")) + (not (/.null? (|>>))))) + (_.cover [/.global] + (|> (/.global /.Function [parseFloat]) + "js object null?" + not)) + (_.cover [/.function] + (|> (/.function (_ [input/0 Nat]) + Int + (.int input/0)) + "js object null?" + not)) + (_.cover [/.on_browser? /.on_node_js? /.on_nashorn?] + (and (or /.on_nashorn? + /.on_node_js? + /.on_browser?) + (bit#= /.on_nashorn? + (not (or /.on_node_js? + /.on_browser?))) + (bit#= /.on_node_js? + (not (or /.on_nashorn? + /.on_browser?))) + (bit#= /.on_browser? + (not (or /.on_nashorn? + /.on_node_js?))))) + (_.cover [/.type_of] + (and (text#= "boolean" (/.type_of boolean)) + (text#= "number" (/.type_of number)) + (text#= "string" (/.type_of string)) + (text#= "function" (/.type_of function)) + (text#= "object" (/.type_of object)))) + (_.cover [/.import:] + (let [encoding "utf8"] + (text#= string + (cond /.on_nashorn? + (let [binary (java/lang/String::getBytes encoding (as java/lang/String string))] + (|> (java/lang/String::new binary encoding) + (as Text))) + + /.on_node_js? + (|> (Buffer::from string encoding) + (Buffer::toString encoding)) + + ... On the browser + (let [binary (|> (TextEncoder::new encoding) + (TextEncoder::encode string))] + (|> (TextDecoder::new encoding) + (TextDecoder::decode binary))) + )))) - $/export.test - ))))) + $/export.test + ))))) |