mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Added tests that adds a boolean to a hash table
This commit is contained in:
@@ -53,7 +53,7 @@ namespace JsonGeneratorTests
|
|||||||
jsonIs("[3.14]");
|
jsonIs("[3.14]");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_METHOD(AddTwoNumbers)
|
TEST_METHOD(TwoNumbers)
|
||||||
{
|
{
|
||||||
addValue(3.14);
|
addValue(3.14);
|
||||||
addValue(2.72);
|
addValue(2.72);
|
||||||
@@ -61,7 +61,7 @@ namespace JsonGeneratorTests
|
|||||||
jsonIs("[3.14,2.72]");
|
jsonIs("[3.14,2.72]");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_METHOD(AddOneNumberOverCapacity)
|
TEST_METHOD(OneNumberOverCapacity)
|
||||||
{
|
{
|
||||||
addValue(3.14);
|
addValue(3.14);
|
||||||
addValue(2.72);
|
addValue(2.72);
|
||||||
@@ -70,14 +70,14 @@ namespace JsonGeneratorTests
|
|||||||
jsonIs("[3.14,2.72]");
|
jsonIs("[3.14,2.72]");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_METHOD(AddTrue)
|
TEST_METHOD(OneTrue)
|
||||||
{
|
{
|
||||||
addValue(true);
|
addValue(true);
|
||||||
|
|
||||||
jsonIs("[true]");
|
jsonIs("[true]");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_METHOD(AddFalse)
|
TEST_METHOD(OneFalse)
|
||||||
{
|
{
|
||||||
addValue(false);
|
addValue(false);
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,21 @@ namespace JsonGeneratorTests
|
|||||||
jsonIs("{\"key\":null}");
|
jsonIs("{\"key\":null}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_METHOD(OneTrue)
|
||||||
|
{
|
||||||
|
add("key", true);
|
||||||
|
|
||||||
|
jsonIs("{\"key\":true}");
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_METHOD(OneFalse)
|
||||||
|
{
|
||||||
|
add("key", false);
|
||||||
|
|
||||||
|
jsonIs("{\"key\":false}");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|||||||
Reference in New Issue
Block a user