#include "unittest.h"#include "rapidjson/reader.h"#include "rapidjson/internal/dtoa.h"#include "rapidjson/internal/itoa.h"#include "rapidjson/memorystream.h"#include <limits>#include <sstream>
Go to the source code of this file.
Classes | |
| class | CustomStringStream< Encoding > |
| struct | HandlerTerminateAtEndArray |
| struct | HandlerTerminateAtEndObject |
| struct | HandlerTerminateAtStartArray |
| struct | HandlerTerminateAtStartObject |
| class | IStreamWrapper |
| struct | IterativeParsingReaderHandler< Encoding > |
| struct | NumbersAsStringsHandler |
| struct | ParseArrayHandler< count > |
| struct | ParseBoolHandler< expect > |
| struct | ParseDoubleHandler |
| struct | ParseEmptyObjectHandler |
| struct | ParseInt64Handler |
| struct | ParseIntHandler |
| struct | ParseMultipleRootHandler |
| struct | ParseObjectHandler |
| struct | ParseStringHandler< Encoding > |
| struct | ParseUint64Handler |
| struct | ParseUintHandler |
| struct | TerminateHandler< e > |
Macros | |
| #define | ARRAY(...) { __VA_ARGS__ } |
| #define | ARRAY(...) { __VA_ARGS__ } |
| #define | TEST_ARRAY_ERROR(errorCode, str, errorOffset) |
| #define | TEST_DOUBLE(fullPrecision, str, x) |
| #define | TEST_ERROR(errorCode, str, errorOffset) |
| #define | TEST_INTEGER(Handler, str, x) |
| #define | TEST_NAN_INF(str, x) |
| #define | TEST_NAN_INF_ERROR(errorCode, str, errorOffset) |
| #define | TEST_NUMBER_ERROR(errorCode, str, errorOffset, streamPos) |
| #define | TEST_STRING(Encoding, e, x) |
| #define | TEST_STRING_ERROR(errorCode, str, errorOffset, streamPos) |
| #define | TEST_STRINGARRAY(Encoding, utype, array, x) |
| #define | TEST_STRINGARRAY2(Encoding, utype, earray, xarray) |
| #define | TEST_STRINGENCODING_ERROR(Encoding, TargetEncoding, utype, array) |
| #define | TEST_TERMINATION(e, json) |
| #define | TESTERRORHANDLING(text, errorCode, offset) |
Functions | |
| TEST (Reader, ParseTrue) | |
| TEST (Reader, ParseFalse) | |
| TEST (Reader, ParseNumber_Integer) | |
| TEST (Reader, ParseNumber_NormalPrecisionDouble) | |
| TEST (Reader, ParseNumber_FullPrecisionDouble) | |
| TEST (Reader, ParseNumber_NormalPrecisionError) | |
| TEST (Reader, ParseNumber_Error) | |
| TEST (Reader, ParseString) | |
| TEST (Reader, ParseString_Transcoding) | |
| TEST (Reader, ParseString_TranscodingWithValidation) | |
| TEST (Reader, ParseString_NonDestructive) | |
| TEST (Reader, ParseString_Error) | |
| TEST (Reader, ParseEmptyArray) | |
| TEST (Reader, ParseArray) | |
| TEST (Reader, ParseArray_Error) | |
| TEST (Reader, ParseObject) | |
| TEST (Reader, Parse_EmptyObject) | |
| TEST (Reader, Parse_MultipleRoot) | |
| TEST (Reader, ParseIterative_MultipleRoot) | |
| TEST (Reader, ParseInsitu_MultipleRoot) | |
| TEST (Reader, ParseInsituIterative_MultipleRoot) | |
| TEST (Reader, ParseDocument_Error) | |
| TEST (Reader, ParseValue_Error) | |
| TEST (Reader, ParseObject_Error) | |
| TEST (Reader, SkipWhitespace) | |
| TEST (Reader, CustomStringStream) | |
| TEST (Reader, Parse_IStreamWrapper_StringStream) | |
| TEST (Reader, IterativeParsing_ErrorHandling) | |
| TEST (Reader, IterativeParsing_General) | |
| TEST (Reader, IterativeParsing_Count) | |
| TEST (Reader, IterativePullParsing_General) | |
| TEST (Reader, IterativeParsing_ShortCircuit) | |
| TEST (Reader, BaseReaderHandler_Default) | |
| TEST (Reader, ParseTerminationByHandler) | |
| TEST (Reader, ParseComments) | |
| TEST (Reader, ParseEmptyInlineComment) | |
| TEST (Reader, ParseEmptyOnelineComment) | |
| TEST (Reader, ParseMultipleCommentsInARow) | |
| TEST (Reader, InlineCommentsAreDisabledByDefault) | |
| TEST (Reader, OnelineCommentsAreDisabledByDefault) | |
| TEST (Reader, EofAfterOneLineComment) | |
| TEST (Reader, IncompleteMultilineComment) | |
| TEST (Reader, IncompleteMultilineComment2) | |
| TEST (Reader, UnrecognizedComment) | |
| TEST (Reader, NumbersAsStrings) | |
| TEST (Reader, TrailingCommas) | |
| TEST (Reader, TrailingCommasIterative) | |
| TEST (Reader, MultipleTrailingCommaErrors) | |
| TEST (Reader, MultipleTrailingCommaErrorsIterative) | |
| TEST (Reader, EmptyExceptForCommaErrors) | |
| TEST (Reader, EmptyExceptForCommaErrorsIterative) | |
| TEST (Reader, TrailingCommaHandlerTermination) | |
| TEST (Reader, TrailingCommaHandlerTerminationIterative) | |
| TEST (Reader, ParseNanAndInfinity) | |
| template<unsigned extraFlags> | |
| void | TestEmptyExceptForCommaErrors () |
| template<unsigned parseFlags> | |
| void | TestInsituMultipleRoot () |
| template<unsigned parseFlags> | |
| void | TestMultipleRoot () |
| template<unsigned extraFlags> | |
| void | TestMultipleTrailingCommaErrors () |
| template<bool fullPrecision> | |
| static void | TestParseDouble () |
| template<typename Encoding > | |
| ParseErrorCode | TestString (const typename Encoding::Ch *str) |
| template<unsigned extraFlags> | |
| void | TestTrailingCommaHandlerTermination () |
| template<unsigned extraFlags> | |
| void | TestTrailingCommas () |
| #define ARRAY | ( | ... | ) | { __VA_ARGS__ } |
| #define ARRAY | ( | ... | ) | { __VA_ARGS__ } |
| #define TEST_ARRAY_ERROR | ( | errorCode, | |
| str, | |||
| errorOffset | |||
| ) |
| #define TEST_DOUBLE | ( | fullPrecision, | |
| str, | |||
| x | |||
| ) |
| #define TEST_ERROR | ( | errorCode, | |
| str, | |||
| errorOffset | |||
| ) |
Definition at line 936 of file readertest.cpp.
| #define TEST_INTEGER | ( | Handler, | |
| str, | |||
| x | |||
| ) |
| #define TEST_NAN_INF | ( | str, | |
| x | |||
| ) |
| #define TEST_NAN_INF_ERROR | ( | errorCode, | |
| str, | |||
| errorOffset | |||
| ) |
| #define TEST_NUMBER_ERROR | ( | errorCode, | |
| str, | |||
| errorOffset, | |||
| streamPos | |||
| ) |
| #define TEST_STRING | ( | Encoding, | |
| e, | |||
| x | |||
| ) |
| #define TEST_STRING_ERROR | ( | errorCode, | |
| str, | |||
| errorOffset, | |||
| streamPos | |||
| ) |
| #define TEST_STRINGARRAY | ( | Encoding, | |
| utype, | |||
| array, | |||
| x | |||
| ) |
| #define TEST_STRINGARRAY2 | ( | Encoding, | |
| utype, | |||
| earray, | |||
| xarray | |||
| ) |
| #define TEST_STRINGENCODING_ERROR | ( | Encoding, | |
| TargetEncoding, | |||
| utype, | |||
| array | |||
| ) |
| #define TEST_TERMINATION | ( | e, | |
| json | |||
| ) |
Definition at line 1432 of file readertest.cpp.
| #define TESTERRORHANDLING | ( | text, | |
| errorCode, | |||
| offset | |||
| ) |
Definition at line 1111 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseTrue | |||
| ) |
Definition at line 52 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseFalse | |||
| ) |
Definition at line 60 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseNumber_Integer | |||
| ) |
Definition at line 113 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseNumber_NormalPrecisionDouble | |||
| ) |
Definition at line 382 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseNumber_FullPrecisionDouble | |||
| ) |
Definition at line 386 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseNumber_NormalPrecisionError | |||
| ) |
Definition at line 390 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseNumber_Error | |||
| ) |
Definition at line 424 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseString | |||
| ) |
Definition at line 487 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseString_Transcoding | |||
| ) |
Definition at line 572 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseString_TranscodingWithValidation | |||
| ) |
Definition at line 583 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseString_NonDestructive | |||
| ) |
Definition at line 594 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseString_Error | |||
| ) |
Definition at line 612 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseEmptyArray | |||
| ) |
Definition at line 747 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseArray | |||
| ) |
Definition at line 757 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseArray_Error | |||
| ) |
Definition at line 767 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseObject | |||
| ) |
Definition at line 838 of file readertest.cpp.
| TEST | ( | Reader | , |
| Parse_EmptyObject | |||
| ) |
Definition at line 872 of file readertest.cpp.
| TEST | ( | Reader | , |
| Parse_MultipleRoot | |||
| ) |
Definition at line 905 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseIterative_MultipleRoot | |||
| ) |
Definition at line 909 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseInsitu_MultipleRoot | |||
| ) |
Definition at line 928 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseInsituIterative_MultipleRoot | |||
| ) |
Definition at line 932 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseDocument_Error | |||
| ) |
Definition at line 950 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseValue_Error | |||
| ) |
Definition at line 963 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseObject_Error | |||
| ) |
Definition at line 972 of file readertest.cpp.
| TEST | ( | Reader | , |
| SkipWhitespace | |||
| ) |
Definition at line 1007 of file readertest.cpp.
| TEST | ( | Reader | , |
| CustomStringStream | |||
| ) |
Definition at line 1056 of file readertest.cpp.
| TEST | ( | Reader | , |
| Parse_IStreamWrapper_StringStream | |||
| ) |
Definition at line 1097 of file readertest.cpp.
| TEST | ( | Reader | , |
| IterativeParsing_ErrorHandling | |||
| ) |
Definition at line 1124 of file readertest.cpp.
| TEST | ( | Reader | , |
| IterativeParsing_General | |||
| ) |
Definition at line 1222 of file readertest.cpp.
| TEST | ( | Reader | , |
| IterativeParsing_Count | |||
| ) |
Definition at line 1259 of file readertest.cpp.
| TEST | ( | Reader | , |
| IterativePullParsing_General | |||
| ) |
Definition at line 1294 of file readertest.cpp.
| TEST | ( | Reader | , |
| IterativeParsing_ShortCircuit | |||
| ) |
Definition at line 1356 of file readertest.cpp.
| TEST | ( | Reader | , |
| BaseReaderHandler_Default | |||
| ) |
Definition at line 1407 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseTerminationByHandler | |||
| ) |
Definition at line 1441 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseComments | |||
| ) |
Definition at line 1461 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseEmptyInlineComment | |||
| ) |
Definition at line 1479 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseEmptyOnelineComment | |||
| ) |
Definition at line 1489 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseMultipleCommentsInARow | |||
| ) |
Definition at line 1499 of file readertest.cpp.
| TEST | ( | Reader | , |
| InlineCommentsAreDisabledByDefault | |||
| ) |
Definition at line 1512 of file readertest.cpp.
| TEST | ( | Reader | , |
| OnelineCommentsAreDisabledByDefault | |||
| ) |
Definition at line 1535 of file readertest.cpp.
| TEST | ( | Reader | , |
| EofAfterOneLineComment | |||
| ) |
Definition at line 1544 of file readertest.cpp.
| TEST | ( | Reader | , |
| IncompleteMultilineComment | |||
| ) |
Definition at line 1554 of file readertest.cpp.
| TEST | ( | Reader | , |
| IncompleteMultilineComment2 | |||
| ) |
Definition at line 1564 of file readertest.cpp.
| TEST | ( | Reader | , |
| UnrecognizedComment | |||
| ) |
Definition at line 1574 of file readertest.cpp.
| TEST | ( | Reader | , |
| NumbersAsStrings | |||
| ) |
Definition at line 1614 of file readertest.cpp.
| TEST | ( | Reader | , |
| TrailingCommas | |||
| ) |
Definition at line 1725 of file readertest.cpp.
| TEST | ( | Reader | , |
| TrailingCommasIterative | |||
| ) |
Definition at line 1729 of file readertest.cpp.
| TEST | ( | Reader | , |
| MultipleTrailingCommaErrors | |||
| ) |
Definition at line 1758 of file readertest.cpp.
| TEST | ( | Reader | , |
| MultipleTrailingCommaErrorsIterative | |||
| ) |
Definition at line 1762 of file readertest.cpp.
| TEST | ( | Reader | , |
| EmptyExceptForCommaErrors | |||
| ) |
Definition at line 1790 of file readertest.cpp.
| TEST | ( | Reader | , |
| EmptyExceptForCommaErrorsIterative | |||
| ) |
Definition at line 1794 of file readertest.cpp.
| TEST | ( | Reader | , |
| TrailingCommaHandlerTermination | |||
| ) |
Definition at line 1820 of file readertest.cpp.
| TEST | ( | Reader | , |
| TrailingCommaHandlerTerminationIterative | |||
| ) |
Definition at line 1824 of file readertest.cpp.
| TEST | ( | Reader | , |
| ParseNanAndInfinity | |||
| ) |
Definition at line 1828 of file readertest.cpp.
| void TestEmptyExceptForCommaErrors | ( | ) |
Definition at line 1767 of file readertest.cpp.
| void TestInsituMultipleRoot | ( | ) |
Definition at line 914 of file readertest.cpp.
| void TestMultipleRoot | ( | ) |
Definition at line 893 of file readertest.cpp.
| void TestMultipleTrailingCommaErrors | ( | ) |
Definition at line 1734 of file readertest.cpp.
|
static |
Definition at line 188 of file readertest.cpp.
| ParseErrorCode TestString | ( | const typename Encoding::Ch * | str | ) |
Definition at line 604 of file readertest.cpp.
| void TestTrailingCommaHandlerTermination | ( | ) |
Definition at line 1799 of file readertest.cpp.
| void TestTrailingCommas | ( | ) |
Definition at line 1686 of file readertest.cpp.