From e65e734e5df3746ffb7df2cc9fa33826e0083fcd Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 6 May 2018 03:30:47 -0400 Subject: - Re-named shift-left -> left-shift, shift-right -> logical-right-shift, signed-shift-right -> arithmetic-right-shift. --- .../test/test/luxc/lang/analysis/procedure/common.lux | 6 +++--- new-luxc/test/test/luxc/lang/translation/common.lux | 18 +++++++++--------- new-luxc/test/test/luxc/lang/translation/jvm.lux | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'new-luxc/test') 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 ])))] - ["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 - (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 [ ] 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 " " shl") bit.shift-left Nat n/= id code.nat] - [(format "jvm " " shr") bit.signed-shift-right Int i/= nat-to-int (|>> nat-to-int code.int)] - [(format "jvm " " ushr") bit.shift-right Nat n/= id code.nat] + [(format "jvm " " shl") bit.left-shift Nat n/= id code.nat] + [(format "jvm " " shr") bit.arithmetic-right-shift Int i/= nat-to-int (|>> nat-to-int code.int)] + [(format "jvm " " ushr") bit.logical-right-shift Nat n/= id code.nat] )) )))))] -- cgit v1.2.3