aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2018-08-05 01:57:38 -0400
committerEduardo Julian2018-08-05 01:57:38 -0400
commit27d0955180c137813af1dcc36fe4db0ab25d21a8 (patch)
tree404e99333fddc0091a24e541412c0d776136aaa1 /stdlib/test
parent221cf3ea1bd48a8c678d3447558ea94631114ebc (diff)
Some small improvements and fixes.
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux/data/color.lux4
-rw-r--r--stdlib/test/test/lux/host.jvm.lux2
-rw-r--r--stdlib/test/test/lux/time/duration.lux10
3 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/test/test/lux/data/color.lux b/stdlib/test/test/lux/data/color.lux
index 8932fad79..977ffcf01 100644
--- a/stdlib/test/test/lux/data/color.lux
+++ b/stdlib/test/test/lux/data/color.lux
@@ -22,8 +22,8 @@
(def: (distance from to)
(-> @.Color @.Color Frac)
- (let [[fr fg fb] (@.unpack from)
- [tr tg tb] (@.unpack to)]
+ (let [[fr fg fb] (@.to-rgb from)
+ [tr tg tb] (@.to-rgb to)]
(math.pow +0.5 ($_ f/+
(|> (scale tr) (f/- (scale fr)) square)
(|> (scale tg) (f/- (scale fg)) square)
diff --git a/stdlib/test/test/lux/host.jvm.lux b/stdlib/test/test/lux/host.jvm.lux
index 49a229d11..8832bb3f6 100644
--- a/stdlib/test/test/lux/host.jvm.lux
+++ b/stdlib/test/test/lux/host.jvm.lux
@@ -31,7 +31,7 @@
(#private bar A)
(#private baz java/lang/Object)
## Methods
- (#public [] (new [value A]) []
+ (#public [] (new {value A}) []
(exec (:= ::foo #1)
(:= ::bar value)
(:= ::baz "")
diff --git a/stdlib/test/test/lux/time/duration.lux b/stdlib/test/test/lux/time/duration.lux
index 1231fb563..669af6b4c 100644
--- a/stdlib/test/test/lux/time/duration.lux
+++ b/stdlib/test/test/lux/time/duration.lux
@@ -51,13 +51,13 @@
#let [(^open "@/.") @.Order<Duration>]]
($_ seq
(test "Can scale a duration."
- (|> sample (@.scale factor) (@.query sample) (i/= factor)))
+ (|> sample (@.scale-up factor) (@.query sample) (i/= factor)))
(test "Scaling a duration by one does not change it."
- (|> sample (@.scale +1) (@/= sample)))
+ (|> sample (@.scale-up +1) (@/= sample)))
(test "Merging with the empty duration changes nothing."
(|> sample (@.merge @.empty) (@/= sample)))
(test "Merging a duration with it's opposite yields an empty duration."
- (|> sample (@.merge (@.scale -1 sample)) (@/= @.empty)))
+ (|> sample (@.merge (@.scale-up -1 sample)) (@/= @.empty)))
(test "Can frame a duration in terms of another."
(cond (and (@.positive? frame) (@.positive? sample))
(|> sample (@.frame frame) (@/< frame))
@@ -68,9 +68,9 @@
(or (or (@.neutral? frame) (@.neutral? sample))
(|> sample
(@.frame frame)
- (@.scale -1)
+ (@.scale-up -1)
(@/< (if (@.negative? frame)
- (@.scale -1 frame)
+ (@.scale-up -1 frame)
frame))))))))))
(context: "Codec"