From 30c19b40f5fd583d19aa7cf495a19c1b91f86320 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 24 Jul 2019 23:23:13 -0400 Subject: No more "f/"-prefixed functions. + No more "m/"-prefixed functions.--- stdlib/source/test/lux.lux | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'stdlib/source/test/lux.lux') diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux index 945fd9c54..e1039d506 100644 --- a/stdlib/source/test/lux.lux +++ b/stdlib/source/test/lux.lux @@ -1,10 +1,10 @@ (.with-expansions [ (.as-is [runtime (#+)] [primitive (#+)] [structure (#+)] + [function (#+)] [reference (#+)] [case (#+)] [loop (#+)] - [function (#+)] [extension (#+)])] (.module: ["/" lux #* @@ -19,7 +19,10 @@ [data ["." name] [number - ["." i64]]] + ["." i64] + ["." int] + ["." rev] + ["f" frac]]] ["." math] ["_" test (#+ Test)] ## These modules do not need to be tested. @@ -35,7 +38,7 @@ [format [css (#+)] [markdown (#+)]]] - [target + ["@" target [js (#+)] [python (#+)] [lua (#+)] @@ -47,6 +50,8 @@ [compiler [phase [generation + [jvm (#+) + ] [js (#+) ] [python (#+) @@ -291,9 +296,10 @@ on-default))) (_.test "Can pick code depending on the host/platform being targeted." (n/= on-valid-host - (for {"JVM" on-valid-host - "JS" on-valid-host} - on-default)))))) + (`` (for {(~~ (static @.old)) on-valid-host + (~~ (static @.jvm)) on-valid-host + (~~ (static @.js)) on-valid-host} + on-default))))))) (def: test (<| (_.context (name.module (name-of /._))) @@ -314,10 +320,10 @@ [(<| (_.context ) (..minimum-and-maximum <=> [ ] [ ]))] - [i/= i/< i/min i/> i/max r.int "Integers."] - [n/= n/< n/min n/> n/max r.nat "Natural numbers."] - [r/= r/< r/min r/> r/max r.rev "Revolutions."] - [f/= f/< f/min f/> f/max r.frac "Fractions."] + [i/= i/< i/min i/> i/max r.int "Integers."] + [n/= n/< n/min n/> n/max r.nat "Natural numbers."] + [r/= r/< r/min r/> r/max r.rev "Revolutions."] + [f.= f.< f.min f.> f.max r.safe-frac "Fractions."] ))))) (<| (_.context "Conversion.") (`` ($_ _.and @@ -326,11 +332,11 @@ " " (%.name (name-of )))) (..conversion <=>))] - [i/= .nat .int (r@map (i/% +1,000,000) r.int)] - [n/= .int .nat (r@map (n/% 1,000,000) r.nat)] - [i/= .int-to-frac .frac-to-int (r@map (i/% +1,000,000) r.int)] - [f/= .frac-to-int .int-to-frac (r@map (|>> (i/% +1,000,000) .int-to-frac) r.int)] - [r/= .rev-to-frac .frac-to-rev frac-rev] + [i/= .nat .int (r@map (i/% +1,000,000) r.int)] + [n/= .int .nat (r@map (n/% 1,000,000) r.nat)] + [i/= int.frac f.int (r@map (i/% +1,000,000) r.int)] + [f.= f.int int.frac (r@map (|>> (i/% +1,000,000) int.frac) r.int)] + [r/= rev.frac f.rev frac-rev] ))))) (<| (_.context "Prelude macros.") ..prelude-macros) -- cgit v1.2.3