aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux/data/text/regex.lux9
-rw-r--r--stdlib/test/test/lux/math/logic/fuzzy.lux8
2 files changed, 9 insertions, 8 deletions
diff --git a/stdlib/test/test/lux/data/text/regex.lux b/stdlib/test/test/lux/data/text/regex.lux
index 7a6e88d33..7c54d8385 100644
--- a/stdlib/test/test/lux/data/text/regex.lux
+++ b/stdlib/test/test/lux/data/text/regex.lux
@@ -5,6 +5,7 @@
pipe
["p" parser]]
[data
+ [number (#+ hex)]
["." text ("text/." Equivalence<Text>)
format
["." lexer (#+ Lexer)]
@@ -121,9 +122,9 @@
(should-fail (&.regex "\\p{Blank}") "."))
(and (should-pass (&.regex "\\p{ASCII}") text.tab)
- (should-fail (&.regex "\\p{ASCII}") "\u1234"))
+ (should-fail (&.regex "\\p{ASCII}") (text.from-code (hex "1234"))))
- (and (should-pass (&.regex "\\p{Contrl}") "\u0012")
+ (and (should-pass (&.regex "\\p{Contrl}") (text.from-code (hex "12")))
(should-fail (&.regex "\\p{Contrl}") "a"))
(and (should-pass (&.regex "\\p{Punct}") "@")
@@ -132,8 +133,8 @@
(and (should-pass (&.regex "\\p{Graph}") "@")
(should-fail (&.regex "\\p{Graph}") " "))
- (and (should-pass (&.regex "\\p{Print}") "\u0020")
- (should-fail (&.regex "\\p{Print}") "\u1234"))
+ (and (should-pass (&.regex "\\p{Print}") (text.from-code (hex "20")))
+ (should-fail (&.regex "\\p{Print}") (text.from-code (hex "1234"))))
))
))
diff --git a/stdlib/test/test/lux/math/logic/fuzzy.lux b/stdlib/test/test/lux/math/logic/fuzzy.lux
index fe36a58c5..38f1cc75a 100644
--- a/stdlib/test/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/test/test/lux/math/logic/fuzzy.lux
@@ -153,13 +153,13 @@
[#let [set-10 (set.from-list number.Hash<Nat> (list.n/range 0 10))]
sample (|> r.nat (:: @ map (n/% 20)))]
($_ seq
- (test "Values that satisfy a predicate have membership = 1.
- Values that don't have membership = 0."
+ (test (format "Values that satisfy a predicate have membership = 1."
+ "Values that don't have membership = 0.")
(bit/= (r/= _.true (&.membership sample (&.from-predicate n/even?)))
(n/even? sample)))
- (test "Values that belong to a set have membership = 1.
- Values that don't have membership = 0."
+ (test (format "Values that belong to a set have membership = 1."
+ "Values that don't have membership = 0.")
(bit/= (r/= _.true (&.membership sample (&.from-set set-10)))
(set.member? set-10 sample)))
))))