aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/control/parser.lux2
-rw-r--r--stdlib/source/test/lux/control/security/policy.lux1
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux1
-rw-r--r--stdlib/source/test/lux/data/identity.lux2
-rw-r--r--stdlib/source/test/lux/data/number/complex.lux2
-rw-r--r--stdlib/source/test/lux/math.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/default/syntax.lux16
7 files changed, 15 insertions, 11 deletions
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index c0bd6d92e..6e1845d15 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -11,7 +11,7 @@
["$." monad]]}]
[control
[parser
- ["s" code (#+ Parser)]]]
+ ["s" code]]]
[data
["." error (#+ Error)]
[number
diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux
index 69c358e88..6fbcea774 100644
--- a/stdlib/source/test/lux/control/security/policy.lux
+++ b/stdlib/source/test/lux/control/security/policy.lux
@@ -2,6 +2,7 @@
[lux #*
["_" test (#+ Test)]
[abstract
+ [equivalence (#+)]
[hash (#+ Hash)]
[monad (#+ do)]
{[0 #test]
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index 6b4529dfc..19926ca92 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -4,6 +4,7 @@
["_" test (#+ Test)]
[abstract
comonad
+ [functor (#+)]
[monad (#+ do)]]
[data
["." maybe]
diff --git a/stdlib/source/test/lux/data/identity.lux b/stdlib/source/test/lux/data/identity.lux
index 38d20a7d5..3d0ae44c2 100644
--- a/stdlib/source/test/lux/data/identity.lux
+++ b/stdlib/source/test/lux/data/identity.lux
@@ -2,6 +2,8 @@
[lux #*
["_" test (#+ Test)]
[abstract
+ [equivalence (#+)]
+ [functor (#+)]
comonad
[monad (#+ do)]
{[0 #test]
diff --git a/stdlib/source/test/lux/data/number/complex.lux b/stdlib/source/test/lux/data/number/complex.lux
index 8eed3e865..644db8e27 100644
--- a/stdlib/source/test/lux/data/number/complex.lux
+++ b/stdlib/source/test/lux/data/number/complex.lux
@@ -20,7 +20,7 @@
{1
["." / (#+ Complex)]})
-(def: margin-of-error Frac +1.0e-9)
+(def: margin-of-error Frac +0.000000001)
(def: (within? margin standard value)
(-> Frac Complex Complex Bit)
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index c11380015..cee41346a 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -67,7 +67,7 @@
(do r.monad
[sample (|> r.safe-frac (:: @ map (f/* +10.0)))]
(_.test "Logarithm is the inverse of exponential."
- (|> sample /.exp /.log (within? +1.0e-15 sample)))))
+ (|> sample /.exp /.log (within? +0.000000000000001 sample)))))
(<| (_.context "Greatest-Common-Divisor and Least-Common-Multiple")
(do r.monad
[#let [gen-nat (|> r.nat (:: @ map (|>> (n/% 1000) (n/max 1))))]
diff --git a/stdlib/source/test/lux/tool/compiler/default/syntax.lux b/stdlib/source/test/lux/tool/compiler/default/syntax.lux
index a0005cc64..d6aee7e37 100644
--- a/stdlib/source/test/lux/tool/compiler/default/syntax.lux
+++ b/stdlib/source/test/lux/tool/compiler/default/syntax.lux
@@ -82,10 +82,10 @@
(case (let [source-code (%code sample)]
(/.parse "" (dictionary.new text.hash) (text.size source-code)
[default-cursor 0 source-code]))
- (#error.Failure error)
+ (#.Left error)
false
- (#error.Success [_ parsed])
+ (#.Right [_ parsed])
(:: code.equivalence = parsed sample)))
(do @
[other code^]
@@ -94,16 +94,16 @@
source-code//size (text.size source-code)]
(case (/.parse "" (dictionary.new text.hash) source-code//size
[default-cursor 0 source-code])
- (#error.Failure error)
+ (#.Left error)
false
- (#error.Success [remaining =sample])
+ (#.Right [remaining =sample])
(case (/.parse "" (dictionary.new text.hash) source-code//size
remaining)
- (#error.Failure error)
+ (#.Left error)
false
- (#error.Success [_ =other])
+ (#.Right [_ =other])
(and (:: code.equivalence = sample =sample)
(:: code.equivalence = other =other)))))))
)))
@@ -132,10 +132,10 @@
source-code//size (text.size source-code)]
(/.parse "" (dictionary.new text.hash) source-code//size
[default-cursor 0 source-code]))
- (#error.Failure error)
+ (#.Left error)
false
- (#error.Success [_ parsed])
+ (#.Right [_ parsed])
(:: code.equivalence = parsed sample)))
)))