assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
*/
+
+MIN_BYTE = -128;
+MAX_BYTE = 127;
+MIN_OCTET = 0;
+MAX_OCTET = 255;
+MIN_SHORT = -32768;
+MAX_SHORT = 32767;
+MIN_UNSIGNED_SHORT = 0;
+MAX_UNSIGNED_SHORT = 65535;
+MIN_LONG = -2147483648;
+MAX_LONG = 2147483647;
+MIN_UNSIGNED_LONG = 0;
+MAX_UNSIGNED_LONG = 4294967295;
+MIN_LONG_LONG = -9223372036854775808;
+MAX_LONG_LONG = 9223372036854775807;
+MIN_UNSIGNED_LONG_LONG = 0;
+MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
+
+
(function () {
var head_src = document.head.innerHTML;
if (head_src.search(/\/testharness.js\W/) === -1) {
[false, exceptionName],
[NaN, exceptionName],
[0, exceptionName],
+ ["", exceptionName],
["TIZEN", exceptionName],
[undefined, exceptionName]
];
[false, exceptionName],
[NaN, exceptionName],
[0, exceptionName],
+ ["", exceptionName],
["TIZEN", exceptionName],
+ [[], exceptionName],
[{ }, exceptionName],
[undefined, exceptionName]
];
[false, exceptionName],
[NaN, exceptionName],
[0, exceptionName],
+ ["", exceptionName],
["TIZEN", exceptionName],
[{ }, exceptionName],
[function () { }, exceptionName],
[false, exceptionName],
[NaN, exceptionName],
[0, exceptionName],
+ ["", exceptionName],
["TIZEN", exceptionName],
[undefined, exceptionName]
];
case 'date':
assert_true(obj instanceof Date, description);
break;
+ case 'byte':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'octet':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
+ case 'short':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'unsigned short':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
+ case 'long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'unsigned long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
+ case 'long long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
+ break;
+ case 'unsigned long long':
+ assert_equals(typeof (obj), 'number', description);
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ break;
default:
assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
}
assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
}
}
+
/**
* Method to check if attribute is readonly.
* Example usage:
check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
}
+/**
+ * Method to check if attribute can be set to null.
+ * Example usage:
+ * check_not_nullable(syncInfo, "mode");
+ *
+ * @param obj object to test which has not nullable attribute
+ * @param attributeName attribute name.
+ */
+function check_not_nullable(obj, attributeName)
+{ var old_value = obj[attributeName];
+ obj[attributeName] = null;
+ assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
+ obj[attributeName] = old_value;
+}
+
/**
* Method to check NoInterfaceObject
* Example usage:
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'octet':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned short':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long':
assert_equals(typeof (obj), 'number', description);
assert_equals(typeof (obj), 'number', description);
assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
break;
case 'unsigned long long':
assert_equals(typeof (obj), 'number', description);