Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5be1d7f2
Commit
5be1d7f2
authored
Nov 15, 2021
by
Sergei Krivonos
Committed by
Sergei Krivonos
Nov 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-27036: unittest JSON object member name collision
parent
3a96a61e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
unittest/sql/my_json_writer-t.cc
unittest/sql/my_json_writer-t.cc
+18
-0
No files found.
unittest/sql/my_json_writer-t.cc
View file @
5be1d7f2
...
...
@@ -119,7 +119,25 @@ int main(int args, char **argv)
ok
(
w
.
invalid_json
,
"JSON array end of object"
);
}
{
Json_writer
w
;
w
.
start_object
();
w
.
add_member
(
"name"
).
add_ll
(
1
);
w
.
add_member
(
"name"
).
add_ll
(
2
);
w
.
end_object
();
ok
(
w
.
invalid_json
,
"JSON object member name collision"
);
}
{
Json_writer
w
;
w
.
start_object
();
w
.
add_member
(
"name"
).
add_ll
(
1
);
w
.
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"
);
}
diag
(
"Done"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment