summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/libapt/json_test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libapt/json_test.cc b/test/libapt/json_test.cc
index 9c29936f6..ee8f3cebe 100644
--- a/test/libapt/json_test.cc
+++ b/test/libapt/json_test.cc
@@ -59,3 +59,11 @@ TEST(JsonTest, JsonStackRegression)
EXPECT_EQ("{\"a\":[{}],\"b\":[{}]}", os.str());
}
+TEST(JsonTest, JsonNull)
+{
+ std::ostringstream os;
+
+ JsonWriter(os).value(nullptr);
+
+ EXPECT_EQ("null", os.str());
+}