My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Unit_Tests  
Unit test results
Phase-QA, Featured
Updated Feb 4, 2010 by james.ba...@gmail.com

More to come soon





Proper functionality of hexstr2int

Pass: testNullParameter Properly threw exception on null parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 37]

Pass: testEmptyParameter Properly threw exception on empty string parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 48]

Pass: testIntegerParameter Properly threw exception on integer parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 58]

Pass: testArrayParameter Properly threw exception on array parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 71]

Pass: testNonHexString Properly threw exception on non-hex string parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 81]

Pass: testValidHexString hex string AA9900 should convert to 11180288, converted to 11180288 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 91]

Pass: testValidShortHexString hex string 05c should convert to 92, converted to 92 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 99]

Pass: testValid8DigitHexString hex string 12345678 should convert to 305419896, converted to 305419896 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 108]

Pass: testValid10DigitHexString hex string 123456789a should convert to 78187493530, converted to 78187493530 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 118]

Pass: testValid12DigitHexString hex string 123456789abc should convert to 20015998343868, converted to 20015998343868 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 126]

Pass: testValid14DigitHexString hex string 123456789abcde should convert to 5124095576030430, converted to 5124095576030430 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 134]

Fail: testValid16DigitHexString -> hex string 123456789abcdeff should convert to 1311768467463790300, converted to 1311768467463790335 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 142]

Pass: testHexStringWithLeading0x hex string 0x123456789a should convert to 78187493530, converted to 78187493530 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 150]

Fail: testValid48DigitHexString -> hex string fffffffffffffffffffffffffFFFFFFFFFFFFFFFFFFFFFFF should convert to 6.2771017353867E+57, converted to 6.2771017353867E+57 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 157]

Pass: testValidHexStringWithUpperLowerAndNumeric hex string 1aBcD5 should convert to 1752277, converted to 1752277 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 164]

Pass: testValidHexStringWithLeadingZero hex string 01aBcD5 should convert to 1752277, converted to 1752277 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 172]

Pass: testValidHexStringWithTrailingZeros hex string 01aBcD500 should convert to 448582912, converted to 448582912 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 179]

15 passes, 2 fails, and 0 unexpected exceptions.




Proper functionality of binstr2int

Pass: testNullParameter Properly threw exception on null parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 196]

Pass: testEmptyParameter Properly threw exception on empty string parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 207]

Pass: testIntegerParameter Properly threw exception on integer parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 217]

Pass: testInvalidArrayParameter Properly threw exception on array parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 230]

Pass: testNonBinString Properly threw exception on non-binary string parameter at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 240]

Pass: testValidBinString bin string 101100 should convert to 44, converted to 44 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 249]

Pass: testValidBinStringWithTrailingB bin string 101100b should convert to 44, converted to 44 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 258]

Pass: testValidShortBinString bin string 1 should convert to 1, converted to 1 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 266]

Fail: testValid32DigitBinString -> bin string 111101100010101110011010110001101 should convert to 16133018, converted to 8260105613 at [/srv/www/htdocs/otpauth/tests/nutils_tests.php line 282]

23 passes, 3 fails, and 0 unexpected exceptions.




Tests ivcs dictionary and reverse arrays

Pass: testSizeIvcsArray $ivcs array should be 2048 in length, is 2048 at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 24]

Pass: testSizeIvcsInverseArray $ivcs array should be 2048 in length, is 2048 at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 36]

Pass: testIvcsAndReverseArrayEquivalence $ivcs array and $rev_ivcs array should match at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 55]

Pass: testIvcsShortWords $ivcs array words should be strings from 1 to 5 chars in length at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 94]

27 passes, 3 fails, and 0 unexpected exceptions.




Transform array of hashes to IVCS six-word format

Pass: testEmptyArray Properly threw exception on empty array at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 110]

Pass: testStringNotArray Properly threw exception on improper data type (string) at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 119]

Pass: testIntNotArray Properly threw exception on improper data type (int) at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 128]

Pass: testNullNotArray Properly threw exception on null list at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 137]

Pass: testNullArrayItem null item in the list should return a null item at same element at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 157]

Pass: testEmptyArrayItem empty item in the list should return a null item at same element at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 177]

Pass: testNonStringArrayItem integer item in the list should return a null item at same element at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 196]

Pass: testNonStringArrayItem2 item which is array in the list should return a null item at same element at [/srv/www/htdocs/otpauth/tests/ivcs_tests.php line 216]

35 passes, 3 fails, and 0 unexpected exceptions.




IVCS transform attempts from hex data on invalid data

35 passes, 3 fails, and 0 unexpected exceptions.


Sign in to add a comment
Powered by Google Project Hosting