mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Added is_int() regressions
This commit is contained in:
parent
43bc09d838
commit
be8b30974a
2 changed files with 45 additions and 1 deletions
|
@ -89,6 +89,50 @@ module test_is_str() {
|
|||
test_is_str();
|
||||
|
||||
|
||||
module test_is_int() {
|
||||
assert(is_int(-999));
|
||||
assert(is_int(-1));
|
||||
assert(is_int(0));
|
||||
assert(is_int(1));
|
||||
assert(is_int(999));
|
||||
assert(!is_int(-1.1));
|
||||
assert(!is_int(1.1));
|
||||
assert(!is_int(-0.1));
|
||||
assert(!is_int(0.1));
|
||||
assert(!is_int(-99.1));
|
||||
assert(!is_int(99.1));
|
||||
assert(!is_int(undef));
|
||||
assert(!is_int(false));
|
||||
assert(!is_int(true));
|
||||
assert(!is_int("foo"));
|
||||
assert(!is_int([0,1,2]));
|
||||
assert(!is_int([0:1:2]));
|
||||
}
|
||||
test_is_int();
|
||||
|
||||
|
||||
module test_is_integer() {
|
||||
assert(is_integer(-999));
|
||||
assert(is_integer(-1));
|
||||
assert(is_integer(0));
|
||||
assert(is_integer(1));
|
||||
assert(is_integer(999));
|
||||
assert(!is_integer(-1.1));
|
||||
assert(!is_integer(1.1));
|
||||
assert(!is_integer(-0.1));
|
||||
assert(!is_integer(0.1));
|
||||
assert(!is_integer(-99.1));
|
||||
assert(!is_integer(99.1));
|
||||
assert(!is_integer(undef));
|
||||
assert(!is_integer(false));
|
||||
assert(!is_integer(true));
|
||||
assert(!is_integer("foo"));
|
||||
assert(!is_integer([0,1,2]));
|
||||
assert(!is_integer([0:1:2]));
|
||||
}
|
||||
test_is_integer();
|
||||
|
||||
|
||||
module test_default() {
|
||||
assert(default(undef,23) == 23);
|
||||
assert(default(true,23) == true);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,89];
|
||||
BOSL_VERSION = [2,0,90];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
|
Loading…
Reference in a new issue