Reflection for RapidJSON 0.0.17
Reflection for serializing/deserializing with RapidJSON
Loading...
Searching...
No Matches
JsonGeneratorTests Class Reference

The JsonGeneratorTests class tests the overall functionality of the code generator (CLI and generator itself) and JSON specific parts. More...

Inheritance diagram for JsonGeneratorTests:
[legend]
Collaboration diagram for JsonGeneratorTests:
[legend]

Public Member Functions

 JsonGeneratorTests ()
void testGeneratorItself ()
 Tests whether the generator works by using it directly.
void testCLI ()
 Tests the generator CLI explicitly.
void testIncludingGeneratedHeader ()
 Tests whether the generated reflection code actually works.
void testNesting ()
 Like testIncludingGeneratedHeader() but also for nested structures.
void testSingleInheritence ()
 Like testIncludingGeneratedHeader() but also tests single inheritance.
void testMultipleInheritence ()
 Like testIncludingGeneratedHeader() but also tests multiple inheritance.
void testCustomSerialization ()
 Like testIncludingGeneratedHeader() but also tests custom (de)serialization.
void test3rdPartyAdaption ()
 Tests whether adapting (de)serialization for 3rd party structs works.
void testHandlingConstMembers ()
 Tests whether const member variables are ignored when deserializing.

Detailed Description

The JsonGeneratorTests class tests the overall functionality of the code generator (CLI and generator itself) and JSON specific parts.

Definition at line 26 of file jsongenerator.cpp.

Constructor & Destructor Documentation

◆ JsonGeneratorTests()

JsonGeneratorTests::JsonGeneratorTests ( )

Definition at line 57 of file jsongenerator.cpp.

Member Function Documentation

◆ test3rdPartyAdaption()

void JsonGeneratorTests::test3rdPartyAdaption ( )

Tests whether adapting (de)serialization for 3rd party structs works.

Definition at line 244 of file jsongenerator.cpp.

◆ testCLI()

void JsonGeneratorTests::testCLI ( )

Tests the generator CLI explicitly.

Remarks
Only available under UNIX (like) systems so far, because TESTUTILS_ASSERT_EXEC has not been implemented for other platforms.

Definition at line 91 of file jsongenerator.cpp.

◆ testCustomSerialization()

void JsonGeneratorTests::testCustomSerialization ( )

Like testIncludingGeneratedHeader() but also tests custom (de)serialization.

Definition at line 227 of file jsongenerator.cpp.

◆ testGeneratorItself()

void JsonGeneratorTests::testGeneratorItself ( )

Tests whether the generator works by using it directly.

Definition at line 65 of file jsongenerator.cpp.

◆ testHandlingConstMembers()

void JsonGeneratorTests::testHandlingConstMembers ( )

Tests whether const member variables are ignored when deserializing.

Remarks
This test is very simple since no checks/diagnostics for const members have been implemented yet.

Definition at line 287 of file jsongenerator.cpp.

◆ testIncludingGeneratedHeader()

void JsonGeneratorTests::testIncludingGeneratedHeader ( )

Tests whether the generated reflection code actually works.

Remarks
The following methods do the same. This test case is supposed to be the minimum example.

Definition at line 112 of file jsongenerator.cpp.

◆ testMultipleInheritence()

void JsonGeneratorTests::testMultipleInheritence ( )

Like testIncludingGeneratedHeader() but also tests multiple inheritance.

Definition at line 198 of file jsongenerator.cpp.

◆ testNesting()

void JsonGeneratorTests::testNesting ( )

Like testIncludingGeneratedHeader() but also for nested structures.

Definition at line 136 of file jsongenerator.cpp.

◆ testSingleInheritence()

void JsonGeneratorTests::testSingleInheritence ( )

Like testIncludingGeneratedHeader() but also tests single inheritance.

Definition at line 169 of file jsongenerator.cpp.


The documentation for this class was generated from the following file: