mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27036: re-enable my_json_writer-t unit test
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
struct TABLE;
|
||||
struct JOIN_TAB;
|
||||
class Json_writer;
|
||||
|
||||
|
||||
@@ -45,6 +44,10 @@ public:
|
||||
Opt_trace opt_trace;
|
||||
};
|
||||
|
||||
constexpr uint FAKE_SELECT_LEX_ID= UINT_MAX;
|
||||
|
||||
#define sql_print_error printf
|
||||
|
||||
#define JSON_WRITER_UNIT_TEST
|
||||
#include "../sql/my_json_writer.h"
|
||||
#include "../sql/my_json_writer.cc"
|
||||
@@ -131,11 +134,8 @@ int main(int args, char **argv)
|
||||
{
|
||||
Json_writer w;
|
||||
w.start_object();
|
||||
w.add_member("name").add_ll(1);
|
||||
w.start_object();
|
||||
w.add_member("name").start_object();
|
||||
w.add_member("name").add_ll(2);
|
||||
w.end_object();
|
||||
w.end_object();
|
||||
ok(!w.invalid_json, "Valid JSON: nested object member name is the same");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user