aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/debug.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/debug.lux')
-rw-r--r--stdlib/source/test/lux/debug.lux116
1 files changed, 58 insertions, 58 deletions
diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux
index c55928c15..638afd90f 100644
--- a/stdlib/source/test/lux/debug.lux
+++ b/stdlib/source/test/lux/debug.lux
@@ -55,18 +55,18 @@
sample_text (random.ascii/upper 10)
sample_nat random.nat
sample_rev random.rev]
- (wrap (`` (and (~~ (template [<type> <format> <sample>]
- [(|> (/.representation <type> <sample>)
- (try\map (text\= (<format> <sample>)))
- (try.default false))]
+ (in (`` (and (~~ (template [<type> <format> <sample>]
+ [(|> (/.representation <type> <sample>)
+ (try\map (text\= (<format> <sample>)))
+ (try.default false))]
- [Bit %.bit sample_bit]
- [Nat %.nat sample_nat]
- [Int %.int sample_int]
- [Rev %.rev sample_rev]
- [Frac %.frac sample_frac]
- [Text %.text sample_text]))
- )))))
+ [Bit %.bit sample_bit]
+ [Nat %.nat sample_nat]
+ [Int %.int sample_int]
+ [Rev %.rev sample_rev]
+ [Frac %.frac sample_frac]
+ [Text %.text sample_text]))
+ )))))
(def: can_represent_structure_types
(Random Bit)
@@ -74,32 +74,32 @@
[sample_bit random.bit
sample_int random.int
sample_frac random.frac]
- (wrap (`` (and (case (/.representation (type [Bit Int Frac])
- [sample_bit sample_int sample_frac])
- (#try.Success actual)
- (text\= (format "[" (%.bit sample_bit)
- " " (%.int sample_int)
- " " (%.frac sample_frac)
- "]")
- actual)
+ (in (`` (and (case (/.representation (type [Bit Int Frac])
+ [sample_bit sample_int sample_frac])
+ (#try.Success actual)
+ (text\= (format "[" (%.bit sample_bit)
+ " " (%.int sample_int)
+ " " (%.frac sample_frac)
+ "]")
+ actual)
- (#try.Failure error)
- false)
- ## TODO: Uncomment after switching from the old (tag+last?) to the new (lefts+right?) representation for variants
- ## (~~ (template [<lefts> <right?> <value> <format>]
- ## [(|> (/.representation (type (| Bit Int Frac))
- ## (: (| Bit Int Frac)
- ## (<lefts> <right?> <value>)))
- ## (try\map (text\= (format "(" (%.nat <lefts>)
- ## " " (%.bit <right?>)
- ## " " (<format> <value>) ")")))
- ## (try.default false))]
+ (#try.Failure error)
+ false)
+ ## TODO: Uncomment after switching from the old (tag+last?) to the new (lefts+right?) representation for variants
+ ## (~~ (template [<lefts> <right?> <value> <format>]
+ ## [(|> (/.representation (type (| Bit Int Frac))
+ ## (: (| Bit Int Frac)
+ ## (<lefts> <right?> <value>)))
+ ## (try\map (text\= (format "(" (%.nat <lefts>)
+ ## " " (%.bit <right?>)
+ ## " " (<format> <value>) ")")))
+ ## (try.default false))]
- ## [0 #0 sample_bit %.bit]
- ## [1 #0 sample_int %.int]
- ## [1 #1 sample_frac %.frac]
- ## ))
- )))))
+ ## [0 #0 sample_bit %.bit]
+ ## [1 #0 sample_int %.int]
+ ## [1 #1 sample_frac %.frac]
+ ## ))
+ )))))
(def: can_represent_complex_types
(Random Bit)
@@ -111,19 +111,19 @@
sample_code $//code.random
sample_xml $//xml.random
sample_json $//json.random]
- (wrap (`` (and (~~ (template [<type> <format> <sample>]
- [(|> (/.representation <type> <sample>)
- (try\map (text\= (<format> <sample>)))
- (try.default false))]
+ (in (`` (and (~~ (template [<type> <format> <sample>]
+ [(|> (/.representation <type> <sample>)
+ (try\map (text\= (<format> <sample>)))
+ (try.default false))]
- [Ratio %.ratio sample_ratio]
- [Name %.name sample_name]
- [Location %.location sample_location]
- [Code %.code sample_code]
- [Type %.type sample_type]
- [XML %.xml sample_xml]
- [JSON %.json sample_json]))
- )))))
+ [Ratio %.ratio sample_ratio]
+ [Name %.name sample_name]
+ [Location %.location sample_location]
+ [Code %.code sample_code]
+ [Type %.type sample_type]
+ [XML %.xml sample_xml]
+ [JSON %.json sample_json]))
+ )))))
(def: can_represent_time_types
(Random Bit)
@@ -134,18 +134,18 @@
sample_month random.month
sample_time random.time
sample_day random.day]
- (wrap (`` (and (~~ (template [<type> <format> <sample>]
- [(|> (/.representation <type> <sample>)
- (try\map (text\= (<format> <sample>)))
- (try.default false))]
+ (in (`` (and (~~ (template [<type> <format> <sample>]
+ [(|> (/.representation <type> <sample>)
+ (try\map (text\= (<format> <sample>)))
+ (try.default false))]
- [Instant %.instant sample_instant]
- [Duration %.duration sample_duration]
- [Date %.date sample_date]
- [Month %.month sample_month]
- [Time %.time sample_time]
- [Day %.day sample_day]))
- )))))
+ [Instant %.instant sample_instant]
+ [Duration %.duration sample_duration]
+ [Date %.date sample_date]
+ [Month %.month sample_month]
+ [Time %.time sample_time]
+ [Day %.day sample_day]))
+ )))))
(def: representation
Test