mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-20 16:03:36 +02:00
Fix test failure regarding int->float conversion
Supply only small integers (< 1^23) to int->float conversion tests, so they can roundtrip without error.
This commit is contained in:
parent
197ed8c983
commit
c203928fae
@ -201,10 +201,8 @@ TYPED_TEST_P(IntegerToFloatingPointTest, simple_buffer)
|
||||
v.push_back(1);
|
||||
if (numeric_limits<integer_type>::is_signed) v.push_back(-1);
|
||||
else v.push_back(2);
|
||||
v.push_back(numeric_limits<integer_type>::min());
|
||||
v.push_back(numeric_limits<integer_type>::max());
|
||||
for (unsigned int i = 0; i < kLoop; i++) {
|
||||
v.push_back(rand());
|
||||
v.push_back(rand() % 0x7FFFFF);
|
||||
}
|
||||
for (unsigned int i = 0; i < v.size() ; i++) {
|
||||
msgpack::sbuffer sbuf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user