mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 12:02:14 +02:00
Fix unsigned long
printed as signed long
(issue #170)
This commit is contained in:
@ -125,6 +125,14 @@ TEST_F(JsonParser_Array_Tests, TwoDoubles) {
|
||||
secondElementMustBe(1e2);
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Array_Tests, UnsignedLong) {
|
||||
whenInputIs("[4294967295]");
|
||||
|
||||
parseMustSucceed();
|
||||
sizeMustBe(1);
|
||||
firstElementMustBe(4294967295UL);
|
||||
}
|
||||
|
||||
TEST_F(JsonParser_Array_Tests, TwoBooleans) {
|
||||
whenInputIs("[true,false]");
|
||||
|
||||
|
@ -57,6 +57,11 @@ TEST_F(JsonVariant_PrintTo_Tests, Long) {
|
||||
outputMustBe("42");
|
||||
}
|
||||
|
||||
TEST_F(JsonVariant_PrintTo_Tests, UnsignedLong) {
|
||||
variant = 4294967295UL;
|
||||
outputMustBe("4294967295");
|
||||
}
|
||||
|
||||
TEST_F(JsonVariant_PrintTo_Tests, Char) {
|
||||
variant = '*';
|
||||
outputMustBe("42");
|
||||
@ -82,4 +87,9 @@ TEST_F(JsonVariant_PrintTo_Tests, PositiveInt64) {
|
||||
variant = 9223372036854775807;
|
||||
outputMustBe("9223372036854775807");
|
||||
}
|
||||
|
||||
TEST_F(JsonVariant_PrintTo_Tests, UInt64) {
|
||||
variant = 18446744073709551615;
|
||||
outputMustBe("18446744073709551615");
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user