vivisect/vivisect — pull request #23 by l1berty (2014-12-10 22:33:58+00:00)
Title: fixed setting of integers that could not be represented by the vstruct n...

...umber types (and hence could not be subsequently vsEmit'd). added min/max checks in vsSetValue, added new signed number type, overrided vsSetValue in bitfield to reflect new behavior, added dynamically generated testcases, minor cleanup

tests output:
test_bitfield (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_basicreasign (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_basicstruct (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_classcallback (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_fastparse (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_fastparse_bigend (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_fieldalign (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_fixedpartialasign (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_floats (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_insertfield (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_lengthcallback (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_parsefd (vstruct.tests.testbasic.VStructTest) ... ok
test_vstruct_varray (vstruct.tests.testbasic.VStructTest) ... ok
test_vsGetFieldByOffset_end (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_invalid1 (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_invalid2 (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_invalid3 (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_nested1 (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_nested2 (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_nested3 (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_nested4 (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_vsGetFieldByOffset_start (vstruct.tests.tests_vstruct.VStructTests) ... ok
test_int16_False_-32768 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int16_False_32767 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int16_True_-32769 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int16_True_32768 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int24_False_-8388608 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int24_False_8388607 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int24_True_-8388609 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int24_True_8388608 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int32_False_-2147483648 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int32_False_2147483647 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int32_True_-2147483649 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int32_True_2147483648 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int64_False_-9223372036854775808 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int64_False_9223372036854775807 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int64_True_-9223372036854775809 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int64_True_9223372036854775808 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int8_False_-128 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int8_False_127 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int8_True_-129 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_int8_True_128 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint16_False_0 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint16_False_65535 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint16_True_-1 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint16_True_65536 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint24_False_0 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint24_False_16777215 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint24_True_-1 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint24_True_16777216 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint32_False_0 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint32_False_4294967295 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint32_True_-1 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint32_True_4294967296 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint64_False_0 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint64_False_18446744073709551615 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint64_True_-1 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint64_True_18446744073709551616 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint8_False_0 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint8_False_255 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint8_True_-1 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok
test_uint8_True_256 (vstruct.tests.tests_vstruct.VStructTypeTests) ... ok

----------------------------------------------------------------------
Ran 62 tests in 0.010s

OK