Added is_int() regressions

This commit is contained in:
Revar Desmera 2020-01-15 20:27:01 -08:00
parent 43bc09d838
commit be8b30974a
2 changed files with 45 additions and 1 deletions

View file

@ -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);

View file

@ -8,7 +8,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,89];
BOSL_VERSION = [2,0,90];
// Section: BOSL Library Version Functions