aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/procedure/common.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/translation/common.lux18
-rw-r--r--new-luxc/test/test/luxc/lang/translation/jvm.lux6
3 files changed, 15 insertions, 15 deletions
diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
index 6d176e0cd..9cd456f5d 100644
--- a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
@@ -73,11 +73,11 @@
(test "Can perform bit 'xor'."
(check-success+ "lux bit xor" (list subjectC paramC) Nat))
(test "Can shift bit pattern to the left."
- (check-success+ "lux bit shift-left" (list subjectC paramC) Nat))
+ (check-success+ "lux bit left-shift" (list subjectC paramC) Nat))
(test "Can shift bit pattern to the right."
- (check-success+ "lux bit unsigned-shift-right" (list subjectC paramC) Nat))
+ (check-success+ "lux bit logical-right-shift" (list subjectC paramC) Nat))
(test "Can shift signed bit pattern to the right."
- (check-success+ "lux bit shift-right" (list signedC paramC) Int))
+ (check-success+ "lux bit arithmetic-right-shift" (list signedC paramC) Int))
))))
(context: "Nat procedures"
diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux
index 964be4af3..2da309f34 100644
--- a/new-luxc/test/test/luxc/lang/translation/common.lux
+++ b/new-luxc/test/test/luxc/lang/translation/common.lux
@@ -37,20 +37,20 @@
false))
(let [param <param-expr>])))]
- ["lux bit and" bit.and param]
- ["lux bit or" bit.or param]
- ["lux bit xor" bit.xor param]
- ["lux bit shift-left" bit.shift-left (n/% +64 param)]
- ["lux bit unsigned-shift-right" bit.shift-right (n/% +64 param)]
+ ["lux bit and" bit.and param]
+ ["lux bit or" bit.or param]
+ ["lux bit xor" bit.xor param]
+ ["lux bit left-shift" bit.left-shift (n/% +64 param)]
+ ["lux bit logical-right-shift" bit.logical-right-shift (n/% +64 param)]
)]
($_ seq
<binary>
- (test "lux bit shift-right"
- (|> (run (` ("lux bit shift-right"
+ (test "lux bit arithmetic-right-shift"
+ (|> (run (` ("lux bit arithmetic-right-shift"
(~ (code.int (nat-to-int subject)))
(~ (code.nat param)))))
(case> (#e.Success valueT)
- (i/= (bit.signed-shift-right param (nat-to-int subject))
+ (i/= (bit.arithmetic-right-shift param (nat-to-int subject))
(:! Int valueT))
(#e.Error error)
@@ -94,7 +94,7 @@
["lux int to-frac" Frac int-to-frac f/= subject]
["lux int char" Text (|>> (:! Nat) text.from-code) text/= (|> subject
(:! Nat)
- (n/% (bit.shift-left +8 +1))
+ (n/% (bit.left-shift +8 +1))
(:! Int))]
))
(~~ (do-template [<name> <reference> <outputT> <comp>]
diff --git a/new-luxc/test/test/luxc/lang/translation/jvm.lux b/new-luxc/test/test/luxc/lang/translation/jvm.lux
index 0ece8db82..54966ae65 100644
--- a/new-luxc/test/test/luxc/lang/translation/jvm.lux
+++ b/new-luxc/test/test/luxc/lang/translation/jvm.lux
@@ -216,9 +216,9 @@
(#e.Error error)
false)))]
- [(format "jvm " <domain> " shl") bit.shift-left Nat n/= id code.nat]
- [(format "jvm " <domain> " shr") bit.signed-shift-right Int i/= nat-to-int (|>> nat-to-int code.int)]
- [(format "jvm " <domain> " ushr") bit.shift-right Nat n/= id code.nat]
+ [(format "jvm " <domain> " shl") bit.left-shift Nat n/= id code.nat]
+ [(format "jvm " <domain> " shr") bit.arithmetic-right-shift Int i/= nat-to-int (|>> nat-to-int code.int)]
+ [(format "jvm " <domain> " ushr") bit.logical-right-shift Nat n/= id code.nat]
))
)))))]