aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/parser/synthesis.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/parser/synthesis.lux')
-rw-r--r--stdlib/source/test/lux/control/parser/synthesis.lux60
1 files changed, 30 insertions, 30 deletions
diff --git a/stdlib/source/test/lux/control/parser/synthesis.lux b/stdlib/source/test/lux/control/parser/synthesis.lux
index 753091e27..068ba1235 100644
--- a/stdlib/source/test/lux/control/parser/synthesis.lux
+++ b/stdlib/source/test/lux/control/parser/synthesis.lux
@@ -67,13 +67,13 @@
dummy (|> <random> (random.only (|>> (\ <equivalence> = expected) not)))]
($_ _.and
(_.cover [<query>]
- (|> (/.run <query> (list (<synthesis> expected)))
+ (|> (/.result <query> (list (<synthesis> expected)))
(!expect (^multi (#try.Success actual)
(\ <equivalence> = expected actual)))))
(_.cover [<check>]
- (and (|> (/.run (<check> expected) (list (<synthesis> expected)))
+ (and (|> (/.result (<check> expected) (list (<synthesis> expected)))
(!expect (#try.Success _)))
- (|> (/.run (<check> expected) (list (<synthesis> dummy)))
+ (|> (/.result (<check> expected) (list (<synthesis> dummy)))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_parse error))))))
))]
@@ -97,18 +97,18 @@
expected_f64 random.safe_frac
expected_text (random.unicode 1)]
(_.cover [/.tuple]
- (and (|> (/.run (/.tuple ($_ <>.and /.bit /.i64 /.f64 /.text))
- (list (synthesis.tuple (list (synthesis.bit expected_bit)
- (synthesis.i64 expected_i64)
- (synthesis.f64 expected_f64)
- (synthesis.text expected_text)))))
+ (and (|> (/.result (/.tuple ($_ <>.and /.bit /.i64 /.f64 /.text))
+ (list (synthesis.tuple (list (synthesis.bit expected_bit)
+ (synthesis.i64 expected_i64)
+ (synthesis.f64 expected_f64)
+ (synthesis.text expected_text)))))
(!expect (^multi (#try.Success [actual_bit actual_i64 actual_f64 actual_text])
(and (\ bit.equivalence = expected_bit actual_bit)
(\ i64.equivalence = expected_i64 actual_i64)
(\ frac.equivalence = expected_f64 actual_f64)
(\ text.equivalence = expected_text actual_text)))))
- (|> (/.run (/.tuple ($_ <>.and /.bit /.i64 /.f64 /.text))
- (list (synthesis.text expected_text)))
+ (|> (/.result (/.tuple ($_ <>.and /.bit /.i64 /.f64 /.text))
+ (list (synthesis.text expected_text)))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_parse error)))))))
(do {! random.monad}
@@ -116,15 +116,15 @@
expected_environment ..random_environment
expected_body (random.unicode 1)]
(_.cover [/.function]
- (and (|> (/.run (/.function arity /.text)
- (list (synthesis.function/abstraction [expected_environment arity (synthesis.text expected_body)])))
+ (and (|> (/.result (/.function arity /.text)
+ (list (synthesis.function/abstraction [expected_environment arity (synthesis.text expected_body)])))
(!expect (^multi (#try.Success [actual_environment actual_body])
(and (\ (list.equivalence synthesis.equivalence) =
expected_environment
actual_environment)
(\ text.equivalence = expected_body actual_body)))))
- (|> (/.run (/.function arity /.text)
- (list (synthesis.text expected_body)))
+ (|> (/.result (/.function arity /.text)
+ (list (synthesis.text expected_body)))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_parse error)))))))
(do {! random.monad}
@@ -132,8 +132,8 @@
expected_environment ..random_environment
expected_body (random.unicode 1)]
(_.cover [/.wrong_arity]
- (|> (/.run (/.function (inc arity) /.text)
- (list (synthesis.function/abstraction [expected_environment arity (synthesis.text expected_body)])))
+ (|> (/.result (/.function (inc arity) /.text)
+ (list (synthesis.function/abstraction [expected_environment arity (synthesis.text expected_body)])))
(!expect (^multi (#try.Failure error)
(exception.match? /.wrong_arity error))))))
(do {! random.monad}
@@ -142,18 +142,18 @@
expected_inits (random.list arity random.bit)
expected_body (random.unicode 1)]
(_.cover [/.loop]
- (and (|> (/.run (/.loop (<>.many /.bit) /.text)
- (list (synthesis.loop/scope [expected_offset
- (list\map (|>> synthesis.bit) expected_inits)
- (synthesis.text expected_body)])))
+ (and (|> (/.result (/.loop (<>.many /.bit) /.text)
+ (list (synthesis.loop/scope [expected_offset
+ (list\map (|>> synthesis.bit) expected_inits)
+ (synthesis.text expected_body)])))
(!expect (^multi (#try.Success [actual_offset actual_inits actual_body])
(and (\ n.equivalence = expected_offset actual_offset)
(\ (list.equivalence bit.equivalence) =
expected_inits
actual_inits)
(\ text.equivalence = expected_body actual_body)))))
- (|> (/.run (/.loop (<>.many /.bit) /.text)
- (list (synthesis.text expected_body)))
+ (|> (/.result (/.loop (<>.many /.bit) /.text)
+ (list (synthesis.text expected_body)))
(!expect (^multi (#try.Failure error)
(exception.match? /.cannot_parse error)))))))
))
@@ -165,34 +165,34 @@
($_ _.and
(do {! random.monad}
[expected (\ ! map (|>> synthesis.i64) random.nat)]
- (_.cover [/.run /.any]
- (|> (/.run /.any (list expected))
+ (_.cover [/.result /.any]
+ (|> (/.result /.any (list expected))
(!expect (^multi (#try.Success actual)
(\ synthesis.equivalence = expected actual))))))
(_.cover [/.empty_input]
- (|> (/.run /.any (list))
+ (|> (/.result /.any (list))
(!expect (^multi (#try.Failure error)
(exception.match? /.empty_input error)))))
(do {! random.monad}
[expected (\ ! map (|>> synthesis.i64) random.nat)]
(_.cover [/.unconsumed_input]
- (|> (/.run /.any (list expected expected))
+ (|> (/.result /.any (list expected expected))
(!expect (^multi (#try.Failure error)
(exception.match? /.unconsumed_input error))))))
(do {! random.monad}
[dummy (\ ! map (|>> synthesis.i64) random.nat)]
(_.cover [/.end! /.expected_empty_input]
- (and (|> (/.run /.end! (list))
+ (and (|> (/.result /.end! (list))
(!expect (#try.Success _)))
- (|> (/.run /.end! (list dummy))
+ (|> (/.result /.end! (list dummy))
(!expect (^multi (#try.Failure error)
(exception.match? /.expected_empty_input error)))))))
(do {! random.monad}
[dummy (\ ! map (|>> synthesis.i64) random.nat)]
(_.cover [/.end?]
- (and (|> (/.run /.end? (list))
+ (and (|> (/.result /.end? (list))
(!expect (#try.Success #1)))
- (|> (/.run (<>.before /.any /.end?) (list dummy))
+ (|> (/.result (<>.before /.any /.end?) (list dummy))
(!expect (#try.Success #0))))))
(_.for [/.cannot_parse]
($_ _.and