mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-27 19:10:24 +01:00
Add Writer. ScanWriteUnescapedString to try to improve coverage
This commit is contained in:
@@ -95,6 +95,18 @@ TEST(Writer, String) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(Writer, ScanWriteUnescapedString) {
|
||||||
|
const char json[] = "[\" \\\"\"]";
|
||||||
|
char buffer2[sizeof(json) + 32];
|
||||||
|
|
||||||
|
// Use different offset to test different alignments
|
||||||
|
for (int i = 0; i < 32; i++) {
|
||||||
|
char* p = buffer2 + i;
|
||||||
|
memcpy(p, json, sizeof(json));
|
||||||
|
TEST_ROUNDTRIP(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TEST(Writer, Double) {
|
TEST(Writer, Double) {
|
||||||
TEST_ROUNDTRIP("[1.2345,1.2345678,0.123456789012,1234567.8]");
|
TEST_ROUNDTRIP("[1.2345,1.2345678,0.123456789012,1234567.8]");
|
||||||
TEST_ROUNDTRIP("0.0");
|
TEST_ROUNDTRIP("0.0");
|
||||||
|
|||||||
Reference in New Issue
Block a user