RetroArch
|
#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>
Classes | |
struct | ParseBoolHandler< expect > |
struct | ParseIntHandler |
struct | ParseUintHandler |
struct | ParseInt64Handler |
struct | ParseUint64Handler |
struct | ParseDoubleHandler |
struct | ParseStringHandler< Encoding > |
struct | ParseArrayHandler< count > |
struct | ParseObjectHandler |
struct | ParseEmptyObjectHandler |
struct | ParseMultipleRootHandler |
class | CustomStringStream< Encoding > |
class | IStreamWrapper |
struct | IterativeParsingReaderHandler< Encoding > |
struct | HandlerTerminateAtStartObject |
struct | HandlerTerminateAtStartArray |
struct | HandlerTerminateAtEndObject |
struct | HandlerTerminateAtEndArray |
struct | TerminateHandler< e > |
struct | NumbersAsStringsHandler |
Macros | |
#define | TEST_INTEGER(Handler, str, x) |
#define | TEST_DOUBLE(fullPrecision, str, x) |
#define | TEST_NUMBER_ERROR(errorCode, str, errorOffset, streamPos) |
#define | TEST_STRING(Encoding, e, x) |
#define | ARRAY(...) { __VA_ARGS__ } |
#define | TEST_STRINGARRAY(Encoding, utype, array, x) |
#define | TEST_STRINGARRAY2(Encoding, utype, earray, xarray) |
#define | TEST_STRING_ERROR(errorCode, str, errorOffset, streamPos) |
#define | ARRAY(...) { __VA_ARGS__ } |
#define | TEST_STRINGENCODING_ERROR(Encoding, TargetEncoding, utype, array) |
#define | TEST_ARRAY_ERROR(errorCode, str, errorOffset) |
#define | TEST_ERROR(errorCode, str, errorOffset) |
#define | TESTERRORHANDLING(text, errorCode, offset) |
#define | TEST_TERMINATION(e, json) |
#define | TEST_NAN_INF(str, x) |
#define | TEST_NAN_INF_ERROR(errorCode, str, errorOffset) |
Functions | |
TEST (Reader, ParseTrue) | |
TEST (Reader, ParseFalse) | |
TEST (Reader, ParseNumber_Integer) | |
template<bool fullPrecision> | |
static void | TestParseDouble () |
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) | |
template<typename Encoding > | |
ParseErrorCode | TestString (const typename Encoding::Ch *str) |
TEST (Reader, ParseString_Error) | |
TEST (Reader, ParseEmptyArray) | |
TEST (Reader, ParseArray) | |
TEST (Reader, ParseArray_Error) | |
TEST (Reader, ParseObject) | |
TEST (Reader, Parse_EmptyObject) | |
template<unsigned parseFlags> | |
void | TestMultipleRoot () |
TEST (Reader, Parse_MultipleRoot) | |
TEST (Reader, ParseIterative_MultipleRoot) | |
template<unsigned parseFlags> | |
void | TestInsituMultipleRoot () |
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, 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) | |
template<unsigned extraFlags> | |
void | TestTrailingCommas () |
TEST (Reader, TrailingCommas) | |
TEST (Reader, TrailingCommasIterative) | |
template<unsigned extraFlags> | |
void | TestMultipleTrailingCommaErrors () |
TEST (Reader, MultipleTrailingCommaErrors) | |
TEST (Reader, MultipleTrailingCommaErrorsIterative) | |
template<unsigned extraFlags> | |
void | TestEmptyExceptForCommaErrors () |
TEST (Reader, EmptyExceptForCommaErrors) | |
TEST (Reader, EmptyExceptForCommaErrorsIterative) | |
template<unsigned extraFlags> | |
void | TestTrailingCommaHandlerTermination () |
TEST (Reader, TrailingCommaHandlerTermination) | |
TEST (Reader, TrailingCommaHandlerTerminationIterative) | |
TEST (Reader, ParseNanAndInfinity) | |
#define ARRAY | ( | ... | ) | { __VA_ARGS__ } |
#define ARRAY | ( | ... | ) | { __VA_ARGS__ } |
#define TEST_ARRAY_ERROR | ( | errorCode, | |
str, | |||
errorOffset | |||
) |
#define TEST_ERROR | ( | errorCode, | |
str, | |||
errorOffset | |||
) |
#define TEST_NAN_INF_ERROR | ( | errorCode, | |
str, | |||
errorOffset | |||
) |
#define TEST_NUMBER_ERROR | ( | errorCode, | |
str, | |||
errorOffset, | |||
streamPos | |||
) |
#define TEST_STRING_ERROR | ( | errorCode, | |
str, | |||
errorOffset, | |||
streamPos | |||
) |
#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 | |||
) |
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 | , |
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 | |||
) |
void TestEmptyExceptForCommaErrors | ( | ) |
void TestInsituMultipleRoot | ( | ) |
void TestMultipleRoot | ( | ) |
void TestMultipleTrailingCommaErrors | ( | ) |
|
static |
ParseErrorCode TestString | ( | const typename Encoding::Ch * | str | ) |
void TestTrailingCommaHandlerTermination | ( | ) |
void TestTrailingCommas | ( | ) |