Commit 3da4afd2 authored by Milo Yip's avatar Milo Yip

Another trial on writer coverage

parent 8fcc65bf
......@@ -105,12 +105,15 @@ struct ScanCopyUnescapedStringHandler : BaseReaderHandler<UTF8<>, ScanCopyUnesca
template <unsigned parseFlags, typename StreamType>
void TestScanCopyUnescapedString() {
char buffer[1024 + 5 + 32];
for (size_t offset = 0; offset < 32; offset++) {
for (size_t step = 0; step < 1024; step++) {
char json[1024 + 5];
char* json = buffer + offset;
char *p = json;
*p ++= '\"';
*p++ = '\"';
for (size_t i = 0; i < step; i++)
*p++= "ABCD"[i % 4];
*p++ = "ABCD"[i % 4];
*p++ = '\\';
*p++ = '\\';
*p++ = '\"';
......@@ -124,6 +127,7 @@ void TestScanCopyUnescapedString() {
EXPECT_EQ('\\', h.buffer[step]); // escaped
EXPECT_EQ('\0', h.buffer[step + 1]);
}
}
}
TEST(SIMD, SIMD_SUFFIX(ScanCopyUnescapedString)) {
......
......@@ -448,6 +448,10 @@ TEST(Writer, NaN) {
StringBuffer buffer;
Writer<StringBuffer> writer(buffer);
EXPECT_FALSE(writer.Double(nan));
GenericStringBuffer<UTF16<> > buffer2;
Writer<GenericStringBuffer<UTF16<> > > writer2(buffer2);
EXPECT_FALSE(writer2.Double(nan));
}
TEST(Writer, Inf) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment