From ce4ffdcecd271b9cebf62d71977a2d5cb5a1a0ee Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Tue, 16 Nov 2021 03:15:39 -0400
Subject: 64-bit integers that work in both normal Ruby & DragonRuby.

---
 stdlib/source/test/lux.lux                  | 10 +++---
 stdlib/source/test/lux/math/number/frac.lux | 48 ++++++++++++++---------------
 2 files changed, 30 insertions(+), 28 deletions(-)

(limited to 'stdlib/source/test')

diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 84353e082..7026c0a48 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -865,10 +865,12 @@
                                    (hide left))
                                 true)))))
         (_.cover [/.same?]
-                 (let [not_left (|> left ++ --)]
-                   (and (/.same? left left)
-                        (and (n.= not_left left)
-                             (not (/.same? not_left left))))))
+                 (let [not_left (|> left ++ -- %.nat)
+                       left (%.nat left)]
+                   (and (and (/.same? left left)
+                             (/.same? not_left not_left))
+                        (and (text#= left not_left)
+                             (not (/.same? left not_left))))))
         (_.cover [/.Rec]
                  (let [list (: (/.Rec NList
                                  (Maybe [Nat NList]))
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index 2b960b43e..bc77f1f32 100644
--- a/stdlib/source/test/lux/math/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
@@ -1,28 +1,28 @@
 (.using
-  [library
-   [lux "*"
-    ["_" test {"+" Test}]
-    ["@" target]
-    ["[0]" ffi]
-    [abstract
-     [monad {"+" do}]
-     [\\specification
-      ["$[0]" equivalence]
-      ["$[0]" hash]
-      ["$[0]" order]
-      ["$[0]" monoid]
-      ["$[0]" codec]]]
-    [data
-     ["[0]" bit ("[1]#[0]" equivalence)]]
-    [math
-     ["[0]" random {"+" Random}]]]]
-  [\\library
-   ["[0]" /
-    [// "*"
-     ["n" nat]
-     ["i" int]
-     ["r" rev]
-     ["[0]" i64]]]])
+ [library
+  [lux "*"
+   ["_" test {"+" Test}]
+   ["@" target]
+   ["[0]" ffi]
+   [abstract
+    [monad {"+" do}]
+    [\\specification
+     ["$[0]" equivalence]
+     ["$[0]" hash]
+     ["$[0]" order]
+     ["$[0]" monoid]
+     ["$[0]" codec]]]
+   [data
+    ["[0]" bit ("[1]#[0]" equivalence)]]
+   [math
+    ["[0]" random {"+" Random}]]]]
+ [\\library
+  ["[0]" /
+   [// "*"
+    ["n" nat]
+    ["i" int]
+    ["r" rev]
+    ["[0]" i64]]]])
 
 (def: random
   (Random Frac)
-- 
cgit v1.2.3