diff options
author | Eduardo Julian | 2017-10-17 02:01:41 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-17 02:01:41 -0400 |
commit | 14e381de130f0c8d3e333cf0523c6c98b9aa84b1 (patch) | |
tree | 104e98ded63d6d06c894df646d33d6097cf7be34 /stdlib/test | |
parent | 98bfe062d911163a063f7139a840410964f12878 (diff) |
- Added "for" macro to specify platform-dependent code.
- Some refactoring/re-naming.
Diffstat (limited to 'stdlib/test')
-rw-r--r-- | stdlib/test/test/lux.lux | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux index 88f8c6f79..f44430c6c 100644 --- a/stdlib/test/test/lux.lux +++ b/stdlib/test/test/lux.lux @@ -6,7 +6,7 @@ [math] ["r" math/random] (data [maybe] - [text "T/" Eq<Text>] + [text "text/" Eq<Text>] text/format) [meta] (meta ["s" syntax #+ syntax:]))) @@ -96,7 +96,7 @@ ## Skip this test for Deg ## because Deg division loses the last ## 32 bits of precision. - (or (T/= "Deg" category) + (or (text/= "Deg" category) (and (|> x (* <1>) (= x)) (|> x (/ <1>) (= x)))))) @@ -111,7 +111,7 @@ ## Skip this test for Deg ## because Deg division loses the last ## 32 bits of precision. - (or (T/= "Deg" category) + (or (text/= "Deg" category) (or (> x' y) (|> x' (/ y) (* y) (= x')))) ))] @@ -172,9 +172,19 @@ (template: (hypotenuse x y) (i.+ (i.* x x) (i.* y y))) -(context: "Templates" +(context: "Templates." [x r;int y r;int] (test "Template application is a stand-in for the templated code." (i.= (i.+ (i.* x x) (i.* y y)) (hypotenuse x y)))) + +(context: "Cross-platform support." + ($_ seq + (test "Can provide default in case there is no particular platform support." + (for {"" false} + true)) + (test "Can pick code depending on the platform being targeted." + (for {"JVM" true + "JS" true} + false)))) |