RetroArch
Classes | Namespaces | Macros | Typedefs | Functions | Variables
pointertest.cpp File Reference
#include "unittest.h"
#include "rapidjson/pointer.h"
#include "rapidjson/stringbuffer.h"
#include <sstream>
Include dependency graph for pointertest.cpp:

Classes

class  myjson::MyAllocator
 

Namespaces

 myjson
 

Macros

#define NAME(s)   { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }
 
#define INDEX(i)   { #i, sizeof(#i) - 1, i }
 

Typedefs

typedef rapidjson::GenericDocument< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< MyAllocator >, MyAllocator > myjson::Document
 
typedef rapidjson::GenericPointer< ::myjson::Document::ValueType, MyAllocator > myjson::Pointer
 
typedef ::myjson::Document::ValueType myjson::Value
 

Functions

 TEST (Pointer, DefaultConstructor)
 
 TEST (Pointer, Parse)
 
 TEST (Pointer, Parse_URIFragment)
 
 TEST (Pointer, Stringify)
 
 TEST (Pointer, ConstructorWithToken)
 
 TEST (Pointer, CopyConstructor)
 
 TEST (Pointer, Assignment)
 
 TEST (Pointer, Append)
 
 TEST (Pointer, Equality)
 
 TEST (Pointer, Inequality)
 
 TEST (Pointer, Create)
 
 TEST (Pointer, Get)
 
 TEST (Pointer, GetWithDefault)
 
 TEST (Pointer, GetWithDefault_NoAllocator)
 
 TEST (Pointer, Set)
 
 TEST (Pointer, Set_NoAllocator)
 
 TEST (Pointer, Swap)
 
 TEST (Pointer, Swap_NoAllocator)
 
 TEST (Pointer, Erase)
 
 TEST (Pointer, CreateValueByPointer)
 
 TEST (Pointer, CreateValueByPointer_NoAllocator)
 
 TEST (Pointer, GetValueByPointer)
 
 TEST (Pointer, GetValueByPointerWithDefault_Pointer)
 
 TEST (Pointer, GetValueByPointerWithDefault_String)
 
 TEST (Pointer, GetValueByPointerWithDefault_Pointer_NoAllocator)
 
 TEST (Pointer, GetValueByPointerWithDefault_String_NoAllocator)
 
 TEST (Pointer, SetValueByPointer_Pointer)
 
 TEST (Pointer, SetValueByPointer_String)
 
 TEST (Pointer, SetValueByPointer_Pointer_NoAllocator)
 
 TEST (Pointer, SetValueByPointer_String_NoAllocator)
 
 TEST (Pointer, SwapValueByPointer)
 
 TEST (Pointer, SwapValueByPointer_NoAllocator)
 
 TEST (Pointer, EraseValueByPointer_Pointer)
 
 TEST (Pointer, EraseValueByPointer_String)
 
 TEST (Pointer, Ambiguity)
 
 TEST (Pointer, Issue483)
 

Variables

static const char kJson []
 
static const Pointer::Token kTokens [] = { NAME("foo"), INDEX(0) }
 

Macro Definition Documentation

◆ INDEX

#define INDEX (   i)    { #i, sizeof(#i) - 1, i }

◆ NAME

#define NAME (   s)    { s, sizeof(s) / sizeof(s[0]) - 1, kPointerInvalidIndex }

Function Documentation

◆ TEST() [1/36]

TEST ( Pointer  ,
DefaultConstructor   
)

◆ TEST() [2/36]

TEST ( Pointer  ,
Parse   
)

◆ TEST() [3/36]

TEST ( Pointer  ,
Parse_URIFragment   
)
Here is the call graph for this function:

◆ TEST() [4/36]

TEST ( Pointer  ,
Stringify   
)

◆ TEST() [5/36]

TEST ( Pointer  ,
ConstructorWithToken   
)

◆ TEST() [6/36]

TEST ( Pointer  ,
CopyConstructor   
)

◆ TEST() [7/36]

TEST ( Pointer  ,
Assignment   
)

◆ TEST() [8/36]

TEST ( Pointer  ,
Append   
)
Here is the call graph for this function:

◆ TEST() [9/36]

TEST ( Pointer  ,
Equality   
)

◆ TEST() [10/36]

TEST ( Pointer  ,
Inequality   
)

◆ TEST() [11/36]

TEST ( Pointer  ,
Create   
)
Here is the call graph for this function:

◆ TEST() [12/36]

TEST ( Pointer  ,
Get   
)
Here is the call graph for this function:

◆ TEST() [13/36]

TEST ( Pointer  ,
GetWithDefault   
)
Here is the call graph for this function:

◆ TEST() [14/36]

TEST ( Pointer  ,
GetWithDefault_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [15/36]

TEST ( Pointer  ,
Set   
)
Here is the call graph for this function:

◆ TEST() [16/36]

TEST ( Pointer  ,
Set_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [17/36]

TEST ( Pointer  ,
Swap   
)
Here is the call graph for this function:

◆ TEST() [18/36]

TEST ( Pointer  ,
Swap_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [19/36]

TEST ( Pointer  ,
Erase   
)
Here is the call graph for this function:

◆ TEST() [20/36]

TEST ( Pointer  ,
CreateValueByPointer   
)
Here is the call graph for this function:

◆ TEST() [21/36]

TEST ( Pointer  ,
CreateValueByPointer_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [22/36]

TEST ( Pointer  ,
GetValueByPointer   
)
Here is the call graph for this function:

◆ TEST() [23/36]

TEST ( Pointer  ,
GetValueByPointerWithDefault_Pointer   
)
Here is the call graph for this function:

◆ TEST() [24/36]

TEST ( Pointer  ,
GetValueByPointerWithDefault_String   
)
Here is the call graph for this function:

◆ TEST() [25/36]

TEST ( Pointer  ,
GetValueByPointerWithDefault_Pointer_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [26/36]

TEST ( Pointer  ,
GetValueByPointerWithDefault_String_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [27/36]

TEST ( Pointer  ,
SetValueByPointer_Pointer   
)
Here is the call graph for this function:

◆ TEST() [28/36]

TEST ( Pointer  ,
SetValueByPointer_String   
)
Here is the call graph for this function:

◆ TEST() [29/36]

TEST ( Pointer  ,
SetValueByPointer_Pointer_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [30/36]

TEST ( Pointer  ,
SetValueByPointer_String_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [31/36]

TEST ( Pointer  ,
SwapValueByPointer   
)
Here is the call graph for this function:

◆ TEST() [32/36]

TEST ( Pointer  ,
SwapValueByPointer_NoAllocator   
)
Here is the call graph for this function:

◆ TEST() [33/36]

TEST ( Pointer  ,
EraseValueByPointer_Pointer   
)
Here is the call graph for this function:

◆ TEST() [34/36]

TEST ( Pointer  ,
EraseValueByPointer_String   
)
Here is the call graph for this function:

◆ TEST() [35/36]

TEST ( Pointer  ,
Ambiguity   
)
Here is the call graph for this function:

◆ TEST() [36/36]

TEST ( Pointer  ,
Issue483   
)

Variable Documentation

◆ kJson

const char kJson[]
static
Initial value:
= "{\n"
" \"foo\":[\"bar\", \"baz\"],\n"
" \"\" : 0,\n"
" \"a/b\" : 1,\n"
" \"c%d\" : 2,\n"
" \"e^f\" : 3,\n"
" \"g|h\" : 4,\n"
" \"i\\\\j\" : 5,\n"
" \"k\\\"l\" : 6,\n"
" \" \" : 7,\n"
" \"m~n\" : 8\n"
"}"

◆ kTokens

const Pointer::Token kTokens[] = { NAME("foo"), INDEX(0) }
static