Added a test that adds a string value in a hash

This commit is contained in:
Benoît Blanchon committed 2014-06-27 13:07:38 +02:00
1 parent ebb257df6e
commit ff4060f5d1
2 files changed
+44 -5

No files matched your search

+12
View File
@@ -16,8 +16,20 @@ namespace JsonGeneratorTests
assertJsonIs("{}");
}
TEST_METHOD(OneString)
{
add("key", "value");
assertJsonIs("{\"key\":\"value\"}");
}
private:
template<typename T>
void add(const char* key, T value)
{
hash.add(key, value);
}
void assertJsonIs(const char* expected)
{
char buffer[256];