From 4a274ee7e226382a3686fe037de00a0c71faf566 Mon Sep 17 00:00:00 2001 From: Piotr Sarna Date: Tue, 21 Aug 2018 11:59:24 +0200 Subject: [PATCH] tests: add parsing varint from JSON string test Refs #3666 Message-Id: --- tests/cql_query_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/cql_query_test.cc b/tests/cql_query_test.cc index 6a690011dc..cfe774a3d7 100644 --- a/tests/cql_query_test.cc +++ b/tests/cql_query_test.cc @@ -2876,14 +2876,16 @@ SEASTAR_TEST_CASE(test_insert_json_types) { e.execute_cql("UPDATE all_types SET b = fromJson('42') WHERE a = fromJson('\"ascii\"');").get(); e.execute_cql("UPDATE all_types SET \"I\" = fromJson('\"zażółć gęślą jaźń\"') WHERE a = fromJson('\"ascii\"');").get(); + e.execute_cql("UPDATE all_types SET n = fromJson('\"2147483648\"') WHERE a = fromJson('\"ascii\"');").get(); e.execute_cql("UPDATE all_types SET o = fromJson('\"3.45\"') WHERE a = fromJson('\"ascii\"');").get(); - msg = e.execute_cql("SELECT a, b, \"I\", o FROM all_types WHERE a = 'ascii'").get0(); + msg = e.execute_cql("SELECT a, b, \"I\", n, o FROM all_types WHERE a = 'ascii'").get0(); assert_that(msg).is_rows().with_rows({ { ascii_type->decompose(sstring("ascii")), long_type->decompose(42l), utf8_type->decompose(sstring("zażółć gęślą jaźń")), + varint_type->decompose(boost::multiprecision::cpp_int(2147483648)), decimal_type->decompose(big_decimal { 2, boost::multiprecision::cpp_int(345) }), } });