diff options
Diffstat (limited to 'stdlib/source/test/lux/ffi/export.rb.lux')
-rw-r--r-- | stdlib/source/test/lux/ffi/export.rb.lux | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/ffi/export.rb.lux b/stdlib/source/test/lux/ffi/export.rb.lux new file mode 100644 index 000000000..0ceaf7e00 --- /dev/null +++ b/stdlib/source/test/lux/ffi/export.rb.lux @@ -0,0 +1,43 @@ +(.using + [library + [lux "*" + ["_" test {"+" Test}] + ["[0]" static] + [math + [number + ["n" nat]]]]] + [\\library + ["[0]" / + ["/[1]" //]]]) + +(with_expansions [<nat> (static.random_nat)] + (/.export: + (def: nullary + Nat + <nat>) + (def: unary + (-> Nat Nat) + (|>> (n.+ <nat>))) + (def: CONSTANT + Nat + <nat>) + (def: $global + (-> Nat Nat) + (|>> (n.+ <nat>)))) + + (//.import: (nullary [] Nat)) + (//.import: (unary [Nat] Nat)) + (//.import: (CONSTANT Nat)) + (//.import: ($global (-> Nat Nat))) + + (def: .public test + Test + (<| (_.covering /._) + ($_ _.and + (_.cover [/.export:] + (and (n.= <nat> (..nullary [])) + (n.= (n.+ <nat> <nat>) (..unary <nat>)) + (n.= <nat> (..CONSTANT)) + (n.= (n.+ <nat> <nat>) ((..$global) <nat>)))) + ))) + ) |