aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
authorEduardo Julian2018-05-06 03:30:47 -0400
committerEduardo Julian2018-05-06 03:30:47 -0400
commite65e734e5df3746ffb7df2cc9fa33826e0083fcd (patch)
treec67b1105a4b421d527804ccbfcab4d29ec20e744 /new-luxc/test
parentf5a6fe62a612c0727063fa9e530d53ddda5fcd82 (diff)
- Re-named shift-left -> left-shift, shift-right -> logical-right-shift, signed-shift-right -> arithmetic-right-shift.
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]
))
)))))]