Monero
Loading...
Searching...
No Matches
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

namespace  myjson

Macros

#define NAME(s)
#define INDEX(i)

Typedefs

typedef rapidjson::GenericDocument< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< MyAllocator >, MyAllocatormyjson::Document
typedef rapidjson::GenericPointer< ::myjson::Document::ValueType, MyAllocatormyjson::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)
Value:
{ #i, static_cast<SizeType>(sizeof(#i) - 1), i }
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.).
Definition rapidjson.h:389

◆ NAME

#define NAME ( s)
Value:
{ s, static_cast<SizeType>(sizeof(s) / sizeof(s[0]) - 1), kPointerInvalidIndex }
#define s(x, c)
Definition aesb.c:47
static RAPIDJSON_NAMESPACE_BEGIN const SizeType kPointerInvalidIndex
Represents an invalid index in GenericPointer::Token.
Definition pointer.h:31

Function Documentation

◆ TEST() [1/36]

TEST ( Pointer ,
Ambiguity  )

◆ TEST() [2/36]

TEST ( Pointer ,
Append  )

◆ TEST() [3/36]

TEST ( Pointer ,
Assignment  )

◆ TEST() [4/36]

TEST ( Pointer ,
ConstructorWithToken  )

◆ TEST() [5/36]

TEST ( Pointer ,
CopyConstructor  )

◆ TEST() [6/36]

TEST ( Pointer ,
Create  )

◆ TEST() [7/36]

◆ TEST() [8/36]

TEST ( Pointer ,
CreateValueByPointer_NoAllocator  )

◆ TEST() [9/36]

TEST ( Pointer ,
DefaultConstructor  )

◆ TEST() [10/36]

TEST ( Pointer ,
Equality  )

◆ TEST() [11/36]

TEST ( Pointer ,
Erase  )

◆ TEST() [12/36]

TEST ( Pointer ,
EraseValueByPointer_Pointer  )

◆ TEST() [13/36]

TEST ( Pointer ,
EraseValueByPointer_String  )

◆ TEST() [14/36]

TEST ( Pointer ,
Get  )

◆ TEST() [15/36]

TEST ( Pointer ,
GetValueByPointer  )

◆ TEST() [16/36]

TEST ( Pointer ,
GetValueByPointerWithDefault_Pointer  )

◆ TEST() [17/36]

TEST ( Pointer ,
GetValueByPointerWithDefault_Pointer_NoAllocator  )

◆ TEST() [18/36]

TEST ( Pointer ,
GetValueByPointerWithDefault_String  )

◆ TEST() [19/36]

TEST ( Pointer ,
GetValueByPointerWithDefault_String_NoAllocator  )

◆ TEST() [20/36]

TEST ( Pointer ,
GetWithDefault  )

◆ TEST() [21/36]

TEST ( Pointer ,
GetWithDefault_NoAllocator  )

◆ TEST() [22/36]

TEST ( Pointer ,
Inequality  )

◆ TEST() [23/36]

TEST ( Pointer ,
Issue483  )

◆ TEST() [24/36]

TEST ( Pointer ,
Parse  )

◆ TEST() [25/36]

TEST ( Pointer ,
Parse_URIFragment  )

◆ TEST() [26/36]

TEST ( Pointer ,
Set  )

◆ TEST() [27/36]

TEST ( Pointer ,
Set_NoAllocator  )

◆ TEST() [28/36]

TEST ( Pointer ,
SetValueByPointer_Pointer  )

◆ TEST() [29/36]

TEST ( Pointer ,
SetValueByPointer_Pointer_NoAllocator  )

◆ TEST() [30/36]

TEST ( Pointer ,
SetValueByPointer_String  )

◆ TEST() [31/36]

TEST ( Pointer ,
SetValueByPointer_String_NoAllocator  )

◆ TEST() [32/36]

TEST ( Pointer ,
Stringify  )

◆ TEST() [33/36]

TEST ( Pointer ,
Swap  )

◆ TEST() [34/36]

TEST ( Pointer ,
Swap_NoAllocator  )

◆ TEST() [35/36]

◆ TEST() [36/36]

TEST ( Pointer ,
SwapValueByPointer_NoAllocator  )

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