diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-08-05 16:50:30 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-08-05 16:50:30 +0200 |
| commit | b79ebd5096321cf8051f483bc20ac11fab9f9d6c (patch) | |
| tree | 9a470e3aebe6b6964f8d1abfa59f0894ba711a50 | |
| parent | 9ac0ed01c014b75441601271c5ab0cf9b8ec4791 (diff) | |
| download | Project-Tick-b79ebd5096321cf8051f483bc20ac11fab9f9d6c.tar.gz Project-Tick-b79ebd5096321cf8051f483bc20ac11fab9f9d6c.zip | |
Remove unnecessary suffixes
| -rw-r--r-- | test/endian_str_test.cpp | 38 | ||||
| -rw-r--r-- | test/io/read_test.cpp | 8 |
2 files changed, 23 insertions, 23 deletions
diff --git a/test/endian_str_test.cpp b/test/endian_str_test.cpp index 1e8b14606b..3f7f481777 100644 --- a/test/endian_str_test.cpp +++ b/test/endian_str_test.cpp @@ -30,15 +30,15 @@ void test_uint() write_little(str, uint8_t (0x01)); write_little(str, uint16_t(0x0102)); - write (str, uint32_t(0x01020304UL), endian::little); - write_little(str, uint64_t(0x0102030405060708ULL)); + write (str, uint32_t(0x01020304), endian::little); + write_little(str, uint64_t(0x0102030405060708)); write_big (str, uint8_t (0x09)); write_big (str, uint16_t(0x090A)); - write_big (str, uint32_t(0x090A0B0CUL)); - write (str, uint64_t(0x090A0B0C0D0E0F10ULL), endian::big); + write_big (str, uint32_t(0x090A0B0C)); + write (str, uint64_t(0x090A0B0C0D0E0F10), endian::big); - const char expected[] = { + const char expected[] { 1, 2, 1, 4, 3, 2, 1, @@ -61,18 +61,18 @@ void test_uint() read_little(str, u16); ASSERT(u16 == 0x0102); read_little(str, u32); - ASSERT(u32 == 0x01020304UL); + ASSERT(u32 == 0x01020304); read(str, u64, endian::little); - ASSERT(u64 == 0x0102030405060708ULL); + ASSERT(u64 == 0x0102030405060708); read_big(str, u8); ASSERT(u8 == 0x09); read_big(str, u16); ASSERT(u16 == 0x090A); read(str, u32, endian::big); - ASSERT(u32 == 0x090A0B0CUL); + ASSERT(u32 == 0x090A0B0C); read_big(str, u64); - ASSERT(u64 == 0x090A0B0C0D0E0F10ULL); + ASSERT(u64 == 0x090A0B0C0D0E0F10); ASSERT(str); //Check if stream has failed } @@ -83,15 +83,15 @@ void test_sint() write_little(str, int8_t (-0x01)); write_little(str, int16_t(-0x0102)); - write_little(str, int32_t(-0x01020304L)); - write (str, int64_t(-0x0102030405060708LL), endian::little); + write_little(str, int32_t(-0x01020304)); + write (str, int64_t(-0x0102030405060708), endian::little); write_big (str, int8_t (-0x09)); write_big (str, int16_t(-0x090A)); - write (str, int32_t(-0x090A0B0CL), endian::big); - write_big (str, int64_t(-0x090A0B0C0D0E0F10LL)); + write (str, int32_t(-0x090A0B0C), endian::big); + write_big (str, int64_t(-0x090A0B0C0D0E0F10)); - const char expected[] = { //meh, stupid narrowing conversions + const char expected[] { //meh, stupid narrowing conversions '\xFF', '\xFE', '\xFE', '\xFC', '\xFC', '\xFD', '\xFE', @@ -114,18 +114,18 @@ void test_sint() read_little(str, i16); ASSERT(i16 == -0x0102); read(str, i32, endian::little); - ASSERT(i32 == -0x01020304L); + ASSERT(i32 == -0x01020304); read_little(str, i64); - ASSERT(i64 == -0x0102030405060708LL); + ASSERT(i64 == -0x0102030405060708); read_big(str, i8); ASSERT(i8 == -0x09); read_big(str, i16); ASSERT(i16 == -0x090A); read_big(str, i32); - ASSERT(i32 == -0x090A0B0CL); + ASSERT(i32 == -0x090A0B0C); read(str, i64, endian::big); - ASSERT(i64 == -0x090A0B0C0D0E0F10LL); + ASSERT(i64 == -0x090A0B0C0D0E0F10); ASSERT(str); //Check if stream has failed } @@ -144,7 +144,7 @@ void test_float() write_big (str, fconst); write_big (str, dconst); - const char expected[] = { + const char expected[] { '\x01', '\xEF', '\xCD', '\xAB', '\x05', '\x04', '\x03', '\x02', '\x01', '\xEF', '\xCD', '\xAB', diff --git a/test/io/read_test.cpp b/test/io/read_test.cpp index d057a686f9..aa731e1e55 100644 --- a/test/io/read_test.cpp +++ b/test/io/read_test.cpp @@ -51,7 +51,7 @@ void test_stream_reader_big() int32_t i; reader.read_num(i); - ASSERT(i == 0x0a0b0c0dL); + ASSERT(i == 0x0a0b0c0d); ASSERT(reader.read_string() == "foobar"); @@ -89,7 +89,7 @@ void test_stream_reader_little() int64_t i; reader.read_num(i); - ASSERT(i == 0x0d0c0b0a09080706LL); + ASSERT(i == 0x0d0c0b0a09080706); ASSERT(reader.read_string() == "foobar"); @@ -115,8 +115,8 @@ void test_read_bigtest() ASSERT(comp.at("byteTest") == tag_byte(127)); ASSERT(comp.at("shortTest") == tag_short(32767)); - ASSERT(comp.at("intTest") == tag_int(2147483647L)); - ASSERT(comp.at("longTest") == tag_long(9223372036854775807LL)); + ASSERT(comp.at("intTest") == tag_int(2147483647)); + ASSERT(comp.at("longTest") == tag_long(9223372036854775807)); ASSERT(comp.at("floatTest") == tag_float(std::stof("0xff1832p-25"))); //0.4982315 ASSERT(comp.at("doubleTest") == tag_double(std::stod("0x1f8f6bbbff6a5ep-54"))); //0.493128713218231 |
