Go to the source code of this file.
|
| bool | testJson (const char *json, size_t &line, size_t &col) |
| |
| | TEST (CursorStreamWrapper, MissingFirstBracket) |
| |
| | TEST (CursorStreamWrapper, MissingQuotes) |
| |
| | TEST (CursorStreamWrapper, MissingColon) |
| |
| | TEST (CursorStreamWrapper, MissingSecondQuotes) |
| |
| | TEST (CursorStreamWrapper, MissingComma) |
| |
| | TEST (CursorStreamWrapper, MissingArrayBracket) |
| |
| | TEST (CursorStreamWrapper, MissingArrayComma) |
| |
| | TEST (CursorStreamWrapper, MissingLastArrayBracket) |
| |
| | TEST (CursorStreamWrapper, MissingLastBracket) |
| |
◆ TEST() [1/9]
Definition at line 36 of file cursorstreamwrappertest.cpp.
37 const char json[] =
"\"string\"\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}";
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [2/9]
Definition at line 45 of file cursorstreamwrappertest.cpp.
46 const char json[] =
"{\"string\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}";
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [3/9]
Definition at line 54 of file cursorstreamwrappertest.cpp.
55 const char json[] =
"{\"string\"\n\n\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}";
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [4/9]
Definition at line 63 of file cursorstreamwrappertest.cpp.
64 const char json[] =
"{\"string\"\n\n:my string\",\"array\"\n:[\"1\", \"2\", \"3\"]}";
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [5/9]
Definition at line 72 of file cursorstreamwrappertest.cpp.
73 const char json[] =
"{\"string\"\n\n:\"my string\"\"array\"\n:[\"1\", \"2\", \"3\"]}";
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [6/9]
Definition at line 81 of file cursorstreamwrappertest.cpp.
82 const char json[] =
"{\"string\"\n\n:\"my string\",\"array\"\n:\"1\", \"2\", \"3\"]}";
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [7/9]
Definition at line 90 of file cursorstreamwrappertest.cpp.
91 const char json[] =
"{\"string\"\n\n:\"my string\",\"array\"\n:[\"1\" \"2\", \"3\"]}";
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [8/9]
Definition at line 99 of file cursorstreamwrappertest.cpp.
100 const char json8[] =
"{\"string\"\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"}";
102 bool ret =
testJson(json8, line, col);
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ TEST() [9/9]
Definition at line 108 of file cursorstreamwrappertest.cpp.
109 const char json9[] =
"{\"string\"\n\n:\"my string\",\"array\"\n:[\"1\", \"2\", \"3\"]";
111 bool ret =
testJson(json9, line, col);
#define EXPECT_TRUE(condition)
bool testJson(const char *json, size_t &line, size_t &col)
#define EXPECT_EQ(val1, val2)
◆ testJson()
| bool testJson |
( |
const char * |
json, |
|
|
size_t & |
line, |
|
|
size_t & |
col |
|
) |
| |
Definition at line 23 of file cursorstreamwrappertest.cpp.
30 col = csw.GetColumn();
bool HasParseError() const
Whether a parse error has occurred in the last parsing.
GenericDocument & ParseStream(InputStream &is)
Parse JSON text from an input stream (with Encoding conversion)
Cursor stream wrapper for counting line and column number if error exists.