Classes | Macros | Functions
writertest.cpp File Reference
#include "unittest.h"
#include "rapidjson/document.h"
#include "rapidjson/reader.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/memorybuffer.h"
#include <sstream>
Include dependency graph for writertest.cpp:

Go to the source code of this file.

Classes

class  OStreamWrapper
 

Macros

#define T(x)
 
#define T(x)
 
#define T(x)
 
#define TEST_ROUNDTRIP(json)
 

Functions

 TEST (Writer, Compact)
 
 TEST (Writer, Root)
 
 TEST (Writer, Int)
 
 TEST (Writer, UInt)
 
 TEST (Writer, Int64)
 
 TEST (Writer, Uint64)
 
 TEST (Writer, String)
 
 TEST (Writer, Issue_889)
 
 TEST (Writer, ScanWriteUnescapedString)
 
 TEST (Writer, Double)
 
 TEST (Writer, Transcode)
 
 TEST (Writer, OStreamWrapper)
 
 TEST (Writer, AssertRootMayBeAnyValue)
 
 TEST (Writer, AssertIncorrectObjectLevel)
 
 TEST (Writer, AssertIncorrectArrayLevel)
 
 TEST (Writer, AssertIncorrectEndObject)
 
 TEST (Writer, AssertIncorrectEndArray)
 
 TEST (Writer, AssertObjectKeyNotString)
 
 TEST (Writer, AssertMultipleRoot)
 
 TEST (Writer, RootObjectIsComplete)
 
 TEST (Writer, RootArrayIsComplete)
 
 TEST (Writer, RootValueIsComplete)
 
 TEST (Writer, InvalidEncoding)
 
 TEST (Writer, ValidateEncoding)
 
 TEST (Writer, InvalidEventSequence)
 
 TEST (Writer, NaN)
 
 TEST (Writer, Inf)
 
 TEST (Writer, RawValue)
 
template<typename TargetEncoding >
void TestTranscode (const char *json)
 

Macro Definition Documentation

#define T (   x)
Value:
{\
StringBuffer buffer;\
Writer<StringBuffer> writer(buffer);\
EXPECT_TRUE(x);\
}
GenericStringBuffer< UTF8< char >, CrtAllocator > StringBuffer
Definition: fwd.h:59
#define T (   x)
Value:
{\
StringBuffer buffer;\
Writer<StringBuffer> writer(buffer);\
writer.StartObject();\
ASSERT_THROW(x, AssertException); \
}
GenericStringBuffer< UTF8< char >, CrtAllocator > StringBuffer
Definition: fwd.h:59
#define T (   x)
Value:
{\
StringBuffer buffer;\
Writer<StringBuffer> writer(buffer);\
EXPECT_FALSE(writer.IsComplete()); \
x; \
EXPECT_TRUE(writer.IsComplete()); \
}
GenericStringBuffer< UTF8< char >, CrtAllocator > StringBuffer
Definition: fwd.h:59
#define TEST_ROUNDTRIP (   json)
Value:
{ \
StringBuffer buffer; \
Writer<StringBuffer> writer(buffer); \
Reader reader; \
reader.Parse<kParseFullPrecisionFlag>(s, writer); \
EXPECT_STREQ(json, buffer.GetString()); \
EXPECT_TRUE(writer.IsComplete()); \
}
GenericReader< UTF8< char >, UTF8< char >, CrtAllocator > Reader
Definition: fwd.h:88
ParseResult Parse(InputStream &is, Handler &handler)
Parse JSON text.
Definition: reader.h:558
XmlRpcServer s
Parse number in full precision (but slower).
Definition: reader.h:153
static const char json[]
GenericStringStream< UTF8< char > > StringStream
Definition: fwd.h:47
GenericStringBuffer< UTF8< char >, CrtAllocator > StringBuffer
Definition: fwd.h:59

Definition at line 43 of file writertest.cpp.

Function Documentation

TEST ( Writer  ,
Compact   
)

Definition at line 30 of file writertest.cpp.

TEST ( Writer  ,
Root   
)

Definition at line 54 of file writertest.cpp.

TEST ( Writer  ,
Int   
)

Definition at line 64 of file writertest.cpp.

TEST ( Writer  ,
UInt   
)

Definition at line 70 of file writertest.cpp.

TEST ( Writer  ,
Int64   
)

Definition at line 78 of file writertest.cpp.

TEST ( Writer  ,
Uint64   
)

Definition at line 83 of file writertest.cpp.

TEST ( Writer  ,
String   
)

Definition at line 88 of file writertest.cpp.

TEST ( Writer  ,
Issue_889   
)

Definition at line 103 of file writertest.cpp.

TEST ( Writer  ,
ScanWriteUnescapedString   
)

Definition at line 116 of file writertest.cpp.

TEST ( Writer  ,
Double   
)

Definition at line 129 of file writertest.cpp.

TEST ( Writer  ,
Transcode   
)

Definition at line 160 of file writertest.cpp.

TEST ( Writer  ,
OStreamWrapper   
)

Definition at line 221 of file writertest.cpp.

TEST ( Writer  ,
AssertRootMayBeAnyValue   
)

Definition at line 236 of file writertest.cpp.

TEST ( Writer  ,
AssertIncorrectObjectLevel   
)

Definition at line 255 of file writertest.cpp.

TEST ( Writer  ,
AssertIncorrectArrayLevel   
)

Definition at line 263 of file writertest.cpp.

TEST ( Writer  ,
AssertIncorrectEndObject   
)

Definition at line 271 of file writertest.cpp.

TEST ( Writer  ,
AssertIncorrectEndArray   
)

Definition at line 278 of file writertest.cpp.

TEST ( Writer  ,
AssertObjectKeyNotString   
)

Definition at line 285 of file writertest.cpp.

TEST ( Writer  ,
AssertMultipleRoot   
)

Definition at line 306 of file writertest.cpp.

TEST ( Writer  ,
RootObjectIsComplete   
)

Definition at line 328 of file writertest.cpp.

TEST ( Writer  ,
RootArrayIsComplete   
)

Definition at line 342 of file writertest.cpp.

TEST ( Writer  ,
RootValueIsComplete   
)

Definition at line 356 of file writertest.cpp.

TEST ( Writer  ,
InvalidEncoding   
)

Definition at line 377 of file writertest.cpp.

TEST ( Writer  ,
ValidateEncoding   
)

Definition at line 406 of file writertest.cpp.

TEST ( Writer  ,
InvalidEventSequence   
)

Definition at line 433 of file writertest.cpp.

TEST ( Writer  ,
NaN   
)

Definition at line 484 of file writertest.cpp.

TEST ( Writer  ,
Inf   
)

Definition at line 503 of file writertest.cpp.

TEST ( Writer  ,
RawValue   
)

Definition at line 527 of file writertest.cpp.

template<typename TargetEncoding >
void TestTranscode ( const char *  json)

Definition at line 144 of file writertest.cpp.



choreo_rapidjson
Author(s):
autogenerated on Thu Jul 18 2019 03:59:09