Monero
Loading...
Searching...
No Matches
valuetest.cpp File Reference
#include "unittest.h"
#include "rapidjson/document.h"
#include <algorithm>
Include dependency graph for valuetest.cpp:

Classes

struct  TerminateHandler< e >
struct  ValueIntComparer

Macros

#define TEST_TERMINATION(e, json)

Functions

 TEST (Value, Size)
 TEST (Value, DefaultConstructor)
 TEST (Value, AssignmentOperator)
template<typename A, typename B>
void TestEqual (const A &a, const B &b)
template<typename A, typename B>
void TestUnequal (const A &a, const B &b)
 TEST (Value, EqualtoOperator)
template<typename Value>
void TestCopyFrom ()
 TEST (Value, CopyFrom)
 TEST (Value, Swap)
 TEST (Value, Null)
 TEST (Value, True)
 TEST (Value, False)
 TEST (Value, Int)
 TEST (Value, Uint)
 TEST (Value, Int64)
 TEST (Value, Uint64)
 TEST (Value, Double)
 TEST (Value, Float)
 TEST (Value, IsLosslessDouble)
 TEST (Value, IsLosslessFloat)
 TEST (Value, String)
 TEST (Value, SetStringNull)
template<typename T, typename Allocator>
static void TestArray (T &x, Allocator &allocator)
 TEST (Value, Array)
 TEST (Value, ArrayHelper)
template<typename T, typename Allocator>
static void TestObject (T &x, Allocator &allocator)
 TEST (Value, Object)
 TEST (Value, ObjectHelper)
 TEST (Value, EraseMember_String)
 TEST (Value, BigNestedArray)
 TEST (Value, BigNestedObject)
 TEST (Value, RemoveLastElement)
 TEST (Document, CrtAllocator)
static void TestShortStringOptimization (const char *str)
 TEST (Value, AllocateShortString)
 TEST (Value, AcceptTerminationByHandler)
static void MergeDuplicateKey (Value &v, Value::AllocatorType &a)
 TEST (Value, MergeDuplicateKey)

Macro Definition Documentation

◆ TEST_TERMINATION

#define TEST_TERMINATION ( e,
json )
Value:
{\
EXPECT_FALSE(d.Parse(json).HasParseError()); \
Reader reader; \
EXPECT_FALSE(d.Accept(h));\
}
static uint64_t h
Definition blockchain_stats.cpp:55
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
Definition document.h:2512
GenericReader< UTF8< char >, UTF8< char >, CrtAllocator > Reader
Definition fwd.h:90
Definition d.py:1
Definition readertest.cpp:1710
rapidjson::Document json
Definition transport.cpp:49

Function Documentation

◆ MergeDuplicateKey()

void MergeDuplicateKey ( Value & v,
Value::AllocatorType & a )
static

◆ TEST() [1/31]

TEST ( Document ,
CrtAllocator  )

◆ TEST() [2/31]

TEST ( Value ,
AcceptTerminationByHandler  )

◆ TEST() [3/31]

TEST ( Value ,
AllocateShortString  )

◆ TEST() [4/31]

TEST ( Value ,
Array  )

◆ TEST() [5/31]

TEST ( Value ,
ArrayHelper  )

◆ TEST() [6/31]

TEST ( Value ,
AssignmentOperator  )

◆ TEST() [7/31]

TEST ( Value ,
BigNestedArray  )

◆ TEST() [8/31]

TEST ( Value ,
BigNestedObject  )

◆ TEST() [9/31]

TEST ( Value ,
CopyFrom  )

◆ TEST() [10/31]

TEST ( Value ,
DefaultConstructor  )

◆ TEST() [11/31]

TEST ( Value ,
Double  )

◆ TEST() [12/31]

TEST ( Value ,
EqualtoOperator  )

◆ TEST() [13/31]

TEST ( Value ,
EraseMember_String  )

◆ TEST() [14/31]

TEST ( Value ,
False  )

◆ TEST() [15/31]

TEST ( Value ,
Float  )

◆ TEST() [16/31]

TEST ( Value ,
Int  )

◆ TEST() [17/31]

TEST ( Value ,
Int64  )

◆ TEST() [18/31]

TEST ( Value ,
IsLosslessDouble  )

◆ TEST() [19/31]

TEST ( Value ,
IsLosslessFloat  )

◆ TEST() [20/31]

TEST ( Value ,
MergeDuplicateKey  )

◆ TEST() [21/31]

TEST ( Value ,
Null  )

◆ TEST() [22/31]

TEST ( Value ,
Object  )

◆ TEST() [23/31]

TEST ( Value ,
ObjectHelper  )

◆ TEST() [24/31]

TEST ( Value ,
RemoveLastElement  )

◆ TEST() [25/31]

TEST ( Value ,
SetStringNull  )

◆ TEST() [26/31]

TEST ( Value ,
Size  )

◆ TEST() [27/31]

TEST ( Value ,
String  )

◆ TEST() [28/31]

TEST ( Value ,
Swap  )

◆ TEST() [29/31]

TEST ( Value ,
True  )

◆ TEST() [30/31]

TEST ( Value ,
Uint  )

◆ TEST() [31/31]

TEST ( Value ,
Uint64  )

◆ TestArray()

template<typename T, typename Allocator>
void TestArray ( T & x,
Allocator & allocator )
static

◆ TestCopyFrom()

template<typename Value>
void TestCopyFrom ( )

◆ TestEqual()

template<typename A, typename B>
void TestEqual ( const A & a,
const B & b )

◆ TestObject()

template<typename T, typename Allocator>
void TestObject ( T & x,
Allocator & allocator )
static

◆ TestShortStringOptimization()

void TestShortStringOptimization ( const char * str)
static

◆ TestUnequal()

template<typename A, typename B>
void TestUnequal ( const A & a,
const B & b )