From 7fab6e42fb986b1d66a6ab9cdf822f429224a3d3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 3 Dec 2018 23:35:02 -0400 Subject: Excised contribution relevant to this: https://github.com/LuxLang/lux/pull/35 --- stdlib/test/test/lux/math/random.lux | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/math/random.lux b/stdlib/test/test/lux/math/random.lux index f3f118c90..a7f126ef3 100644 --- a/stdlib/test/test/lux/math/random.lux +++ b/stdlib/test/test/lux/math/random.lux @@ -28,11 +28,7 @@ _set (r.set number.Hash size r.nat) _dict (r.dictionary number.Hash size r.nat r.nat) top r.nat - filtered (|> r.nat (r.filter (n/<= top))) - shuffle-seed r.nat - #let [sorted (|> _row row.to-list (list.sort n/<)) - shuffled (|> sorted row.from-list (r.shuffle shuffle-seed)) - re-sorted (|> shuffled row.to-list (list.sort n/<))]] + filtered (|> r.nat (r.filter (n/<= top)))] ($_ seq (test "Can produce lists." (n/= size (list.size _list))) @@ -50,9 +46,4 @@ (n/= size (dict.size _dict))) (test "Can filter values." (n/<= top filtered)) - (test "Can shuffle rows." - (let [(^open "v/.") (row.Equivalence number.Equivalence) - sorted (row.from-list sorted)] - (and (not (v/= sorted shuffled)) - (v/= sorted (row.from-list re-sorted))))) )))) -- cgit v1.2.3 From f58ab9dfeb272289989bcf5358ddb2faf273eefe Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 3 Dec 2018 23:42:02 -0400 Subject: Excised contribution relevant to this: https://github.com/LuxLang/lux/pull/34 --- stdlib/test/test/lux/time/duration.lux | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'stdlib/test') diff --git a/stdlib/test/test/lux/time/duration.lux b/stdlib/test/test/lux/time/duration.lux index 669af6b4c..8bf00b88b 100644 --- a/stdlib/test/test/lux/time/duration.lux +++ b/stdlib/test/test/lux/time/duration.lux @@ -57,30 +57,4 @@ (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-up -1 sample)) (@/= @.empty))) - (test "Can frame a duration in terms of another." - (cond (and (@.positive? frame) (@.positive? sample)) - (|> sample (@.frame frame) (@/< frame)) - - (and (@.negative? frame) (@.negative? sample)) - (|> sample (@.frame frame) (@/> frame)) - - (or (or (@.neutral? frame) (@.neutral? sample)) - (|> sample - (@.frame frame) - (@.scale-up -1) - (@/< (if (@.negative? frame) - (@.scale-up -1 frame) - frame)))))))))) - -(context: "Codec" - (<| (times 100) - (do @ - [sample duration - #let [(^open "@/.") @.Equivalence - (^open "@/.") @.Codec]] - (test "Can encode/decode durations." - (E.default #0 - (do E.Monad - [decoded (|> sample @/encode @/decode)] - (wrap (@/= sample decoded)))))))) + (|> sample (@.merge (@.scale-up -1 sample)) (@/= @.empty))))))) -- cgit v1.2.3