Handle multiple arrays.
The storage vector wasn't getting cleared out... Fix that.
Change-Id: Idd29395fd39ea2af7615f5d106653e95aefb70ad
diff --git a/aos/json_to_flatbuffer_test.cc b/aos/json_to_flatbuffer_test.cc
index 82bbd52..be752d0 100644
--- a/aos/json_to_flatbuffer_test.cc
+++ b/aos/json_to_flatbuffer_test.cc
@@ -144,6 +144,14 @@
EXPECT_TRUE(JsonAndBack("{ }"));
}
+// Tests that multiple arrays get properly handled.
+TEST_F(JsonToFlatbufferTest, MultipleArrays) {
+ EXPECT_TRUE(
+ JsonAndBack("{ \"vector_foo_float\": [ 9, 7, 1 ], \"vector_foo_double\": "
+ "[ 9, 7, 1 ] }",
+ "{ \"vector_foo_float\": [ 9.0, 7.0, 1.0 ], "
+ "\"vector_foo_double\": [ 9.0, 7.0, 1.0 ] }"));
+}
// TODO(austin): Missmatched values.
// TODO(austin): enums