Skip to content

Commit 4fd9170

Browse files
committed
Add inner quote test
1 parent 4ddf0c1 commit 4fd9170

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/test/json_pointer_test.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,10 @@ namespace format
165165
\"e^f\": 3,\
166166
\"g|h\": 4,\
167167
\"i\\j\": 5,\
168+
\"k\"l\": 6,\
168169
\" \": 7,\
169170
\"m~n\": 8 }" );
170171

171-
// FIXME: \"k\"l\": 6 parse error
172-
173172
struct assert
174173
{
175174
const wchar_t *ref_token;
@@ -190,6 +189,7 @@ namespace format
190189
{ L"c%d", value::value_t::number_t, 2, T_PASS },
191190
{ L"g|h", value::value_t::number_t, 4, T_PASS },
192191
{ L"i\\j", value::value_t::number_t, 5, T_PASS },
192+
{ L"k\"l", value::value_t::number_t, 6, T_PASS },
193193
{ L"/ ", value::value_t::number_t, 7, T_PASS },
194194
{ L"m~0n", value::value_t::number_t, 8, T_PASS },
195195
{ L"/not", value::value_t::undefined_t, 0, T_PASS },
@@ -223,11 +223,10 @@ namespace format
223223
\"e^f\": 3,\
224224
\"g|h\": 4,\
225225
\"i\\j\": 5,\
226+
\"k\"l\": 6,\
226227
\" \": 7,\
227228
\"m~n\": 8 }" );
228229

229-
// FIXME: \"k\"l\": 6 parse error
230-
231230
struct assert
232231
{
233232
const wchar_t *ref_token;
@@ -245,6 +244,7 @@ namespace format
245244
{ L"c%d", value::value_t::number_t, 2, T_PASS },
246245
{ L"g|h", value::value_t::number_t, 4, T_PASS },
247246
{ L"i\\j", value::value_t::number_t, 5, T_PASS },
247+
{ L"k\"l", value::value_t::number_t, 6, T_PASS },
248248
{ L"/ ", value::value_t::number_t, 7, T_PASS },
249249
{ L"m~0n", value::value_t::number_t, 8, T_PASS },
250250
{ L"/not", value::value_t::undefined_t, 0, T_PASS },

src/test/unit_test.h

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <gtest/gtest.h>
55
#include <exception>
66
#include <algorithm>
7+
#include <cstdio>
78

89
namespace format
910
{

0 commit comments

Comments
 (0)