forked from gambit/gambit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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))) |