Skip to content

Commit

Permalink
add conversion test
Browse files Browse the repository at this point in the history
  • Loading branch information
thephoeron committed Jun 27, 2015
1 parent 6125018 commit 0594acc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion t/bit-smasher.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

;; NOTE: To run this test file, execute `(asdf:test-system :bit-smasher)' in your Lisp.

(plan 2)
(plan 3)

(deftest sanity-check
(pass "PROVE is loaded and ready to go.")
Expand All @@ -22,6 +22,16 @@
4
"Multiplication: (* 2 2) => 4."))

;; Conversion test

(deftest conversion
(is (hex<- (expt 10 64))
"184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000"
"Integer to Hex-String conversion.")
(is (bits<- (expt 10 64))
#*000110000100111100000011111010010011111111111001111101001101101010100111100101111110110101101110001110001110110101100100101111110110101000011111000000010000000000000000000000000000000000000000000000000000000000000000
"Integer to Bit-Vector conversion."))

;; Two's Complement Test

(deftest twos-complement
Expand Down

0 comments on commit 0594acc

Please sign in to comment.