aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/exception.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/exception.lux66
1 files changed, 33 insertions, 33 deletions
diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux
index f62ad9271..534d03252 100644
--- a/stdlib/source/test/lux/control/exception.lux
+++ b/stdlib/source/test/lux/control/exception.lux
@@ -16,11 +16,11 @@
[//
["." try (#+ Try)]]]])
-(exception: an-exception)
-(exception: another-exception)
+(exception: an_exception)
+(exception: another_exception)
(def: label "YOLO")
-(exception: (custom-exception {value Nat})
+(exception: (custom_exception {value Nat})
(/.report [label (%.nat value)]))
(def: #export test
@@ -28,12 +28,12 @@
(do {! random.monad}
[expected random.nat
wrong (|> random.nat (random.filter (|>> (n.= expected) not)))
- assertion-succeeded? random.bit
- #let [report-element (\ ! map %.nat random.nat)]
- field0 report-element
- value0 report-element
- field1 report-element
- value1 report-element]
+ assertion_succeeded? random.bit
+ #let [report_element (\ ! map %.nat random.nat)]
+ field0 report_element
+ value0 report_element
+ field1 report_element
+ value1 report_element]
(<| (_.covering /._)
(_.for [/.Exception])
($_ _.and
@@ -42,41 +42,41 @@
(#try.Success actual) (n.= expected actual)
(#try.Failure _) false))
(_.cover [/.throw]
- (case (/.throw ..an-exception [])
+ (case (/.throw ..an_exception [])
(#try.Success _) false
(#try.Failure _) true))
(_.cover [/.construct]
- (case (/.throw ..an-exception [])
+ (case (/.throw ..an_exception [])
(#try.Success _)
false
(#try.Failure message)
- (text\= message (/.construct ..an-exception []))))
+ (text\= message (/.construct ..an_exception []))))
(_.cover [/.match?]
- (/.match? ..an-exception
- (/.construct ..an-exception [])))
+ (/.match? ..an_exception
+ (/.construct ..an_exception [])))
(_.cover [/.assert]
- (case (/.assert ..an-exception [] assertion-succeeded?)
+ (case (/.assert ..an_exception [] assertion_succeeded?)
(#try.Success _)
- assertion-succeeded?
+ assertion_succeeded?
(#try.Failure message)
- (and (not assertion-succeeded?)
- (text\= message (/.construct ..an-exception [])))))
+ (and (not assertion_succeeded?)
+ (text\= message (/.construct ..an_exception [])))))
(_.cover [/.catch]
(and (n.= expected
- (|> (/.throw ..an-exception [])
- (/.catch ..an-exception (function (_ ex) expected))
+ (|> (/.throw ..an_exception [])
+ (/.catch ..an_exception (function (_ ex) expected))
(/.otherwise (function (_ ex) wrong))))
(n.= expected
- (|> (/.throw ..another-exception [])
- (/.catch ..an-exception (function (_ ex) wrong))
- (/.catch ..another-exception (function (_ ex) expected))
+ (|> (/.throw ..another_exception [])
+ (/.catch ..an_exception (function (_ ex) wrong))
+ (/.catch ..another_exception (function (_ ex) expected))
(/.otherwise (function (_ ex) wrong))))))
(_.cover [/.otherwise]
(n.= expected
- (|> (/.throw ..another-exception [])
- (/.catch ..an-exception (function (_ ex) wrong))
+ (|> (/.throw ..another_exception [])
+ (/.catch ..an_exception (function (_ ex) wrong))
(/.otherwise (function (_ ex) expected)))))
(_.cover [/.report]
(let [report (/.report [field0 value0]
@@ -92,23 +92,23 @@
(text.contains? field1 enumeration)
(text.contains? value1 enumeration))))
(_.cover [/.with]
- (and (case (/.with ..an-exception [] (#try.Success expected))
+ (and (case (/.with ..an_exception [] (#try.Success expected))
(#try.Success actual) (n.= expected actual)
(#try.Failure _) false)
- (case (/.with ..an-exception [] (#try.Failure ""))
+ (case (/.with ..an_exception [] (#try.Failure ""))
(#try.Success _) false
- (#try.Failure message) (text\= message (/.construct ..an-exception [])))
- (case (/.with ..an-exception []
+ (#try.Failure message) (text\= message (/.construct ..an_exception [])))
+ (case (/.with ..an_exception []
(: (Try Nat)
- (/.throw ..another-exception [])))
+ (/.throw ..another_exception [])))
(#try.Success _)
false
(#try.Failure message)
- (and (text.contains? (/.construct ..an-exception []) message)
- (text.contains? (/.construct ..another-exception []) message)))))
+ (and (text.contains? (/.construct ..an_exception []) message)
+ (text.contains? (/.construct ..another_exception []) message)))))
(_.cover [/.exception:]
- (case (/.throw ..custom-exception [expected])
+ (case (/.throw ..custom_exception [expected])
(#try.Success _)
false