summaryrefslogtreecommitdiff
path: root/unittest
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2021-11-05 19:01:43 +0200
committerSergei Krivonos <sergei.krivonos@mariadb.com>2021-11-09 17:07:23 +0200
commit04ad98b5001eafea537d3c655d0021ffb2f5ef06 (patch)
tree8340217602f2c9349f85fad34cb33f022bad2433 /unittest
parentc1e1ca20f48b30c8a754bd42274385065d89060e (diff)
downloadmariadb-git-04ad98b5001eafea537d3c655d0021ffb2f5ef06.tar.gz
MDEV-23766: Re-add Json_writer unit test.
Diffstat (limited to 'unittest')
-rw-r--r--unittest/sql/CMakeLists.txt4
-rw-r--r--unittest/sql/my_json_writer-t.cc2
2 files changed, 4 insertions, 2 deletions
diff --git a/unittest/sql/CMakeLists.txt b/unittest/sql/CMakeLists.txt
index caeac841a5c..ab174680fab 100644
--- a/unittest/sql/CMakeLists.txt
+++ b/unittest/sql/CMakeLists.txt
@@ -37,3 +37,7 @@ TARGET_LINK_LIBRARIES(mf_iocache-t mysys mytap mysys_ssl)
ADD_DEPENDENCIES(mf_iocache-t GenError)
MY_ADD_TEST(mf_iocache)
+# Json writer needs String which needs sql library
+ADD_EXECUTABLE(my_json_writer-t my_json_writer-t.cc dummy_builtins.cc)
+TARGET_LINK_LIBRARIES(my_json_writer-t sql mytap)
+MY_ADD_TEST(my_json_writer)
diff --git a/unittest/sql/my_json_writer-t.cc b/unittest/sql/my_json_writer-t.cc
index 3d23c2f021e..6398a589c33 100644
--- a/unittest/sql/my_json_writer-t.cc
+++ b/unittest/sql/my_json_writer-t.cc
@@ -105,7 +105,6 @@ int main(int args, char **argv)
ok(w.invalid_json, "Named array in an array");
}
- // BAD:
{
Json_writer w;
w.start_array();
@@ -113,7 +112,6 @@ int main(int args, char **argv)
ok(w.invalid_json, "JSON object end of array");
}
- // BAD:
{
Json_writer w;
w.start_object();