Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
unit test: fxfirst-bit-set
  • Loading branch information
James Baker committed Feb 5, 2016
1 parent 82caea4 commit 5dcb5e9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit-tests/01-fixnum/fxfirst-bit-set.scm
@@ -0,0 +1,15 @@
(include "#.scm")

(check-eqv? (##fxfirst-bit-set 1) 0)
(check-eqv? (##fxfirst-bit-set 100) 2)
(check-eqv? (##fxfirst-bit-set -1000) 3)

(check-eqv? (fxfirst-bit-set 1) 0)
(check-eqv? (fxfirst-bit-set 100) 2)
(check-eqv? (fxfirst-bit-set -1000) 3)

(check-tail-exn type-exception? (lambda () (fxfirst-bit-set 0.5)))
(check-tail-exn type-exception? (lambda () (fxfirst-bit-set 1/2)))

(check-tail-exn wrong-number-of-arguments-exception? (lambda () (fxfirst-bit-set)))
(check-tail-exn wrong-number-of-arguments-exception? (lambda () (fxfirst-bit-set 1 1)))

0 comments on commit 5dcb5e9

Please sign in to comment.