ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
Classes | Functions
testJson.cpp File Reference

Unit tests for json handling. More...

#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <nlohmann/json.hpp>
#include <ostream>
#include <daq/fits/json.hpp>

Go to the source code of this file.

Classes

class  TestJson
 

Functions

 TEST_F (TestJson, ParseInvalidJsonThrowsNlohmannException)
 
 TEST_F (TestJson, ParseValueKeywords)
 
 TEST_F (TestJson, ParseEsoKeywords)
 
 TEST_F (TestJson, ParseLiteralKeyword)
 
 TEST_F (TestJson, ParseOptionalKeywordComment)
 
 TEST_F (TestJson, ParseEmptyArray)
 
 TEST_F (TestJson, ParseFailsIfNotAnArray)
 
 TEST_F (TestJson, ParseFailsIfNotAnObjectInArray)
 
 TEST_F (TestJson, ParseFailsIfObjectMissTypeProperty)
 
 TEST_F (TestJson, ParseFailsIfObjectHasUnknownTypeProperty)
 
 TEST_F (TestJson, ParseFailsIfTypeIsNotString)
 
 TEST_F (TestJson, ParseFailsIfObjectMissNameProperty)
 
 TEST_F (TestJson, ParseFailsIfObjectMissValue)
 
 TEST_F (TestJson, ParseFailsIfLiteralKeywordMissValue)
 
 TEST_F (TestJson, ParseFailsIfLiteralKeywordValueIsNotString)
 
 TEST_F (TestJson, ParseFailsIfLiteralKeywordValueTooLong)
 
 TEST_F (TestJson, ParseFailsIfObjectHasUnsupportedValueType)
 
 TEST_F (TestJson, ParseFailsIfNameIsNotString)
 
 TEST_F (TestJson, ParseFailsIfObjectHasCommentThatIsNotString)
 
 TEST_F (TestJson, SerializeJsonKeywords)
 

Detailed Description

Unit tests for json handling.

Definition in file testJson.cpp.

Function Documentation

◆ TEST_F() [1/20]

TEST_F ( TestJson  ,
ParseEmptyArray   
)

Definition at line 282 of file testJson.cpp.

◆ TEST_F() [2/20]

TEST_F ( TestJson  ,
ParseEsoKeywords   
)

Definition at line 118 of file testJson.cpp.

◆ TEST_F() [3/20]

TEST_F ( TestJson  ,
ParseFailsIfLiteralKeywordMissValue   
)

Definition at line 383 of file testJson.cpp.

◆ TEST_F() [4/20]

TEST_F ( TestJson  ,
ParseFailsIfLiteralKeywordValueIsNotString   
)

Definition at line 395 of file testJson.cpp.

◆ TEST_F() [5/20]

TEST_F ( TestJson  ,
ParseFailsIfLiteralKeywordValueTooLong   
)

Definition at line 408 of file testJson.cpp.

◆ TEST_F() [6/20]

TEST_F ( TestJson  ,
ParseFailsIfNameIsNotString   
)

Definition at line 435 of file testJson.cpp.

◆ TEST_F() [7/20]

TEST_F ( TestJson  ,
ParseFailsIfNotAnArray   
)

Definition at line 291 of file testJson.cpp.

◆ TEST_F() [8/20]

TEST_F ( TestJson  ,
ParseFailsIfNotAnObjectInArray   
)

Definition at line 303 of file testJson.cpp.

◆ TEST_F() [9/20]

TEST_F ( TestJson  ,
ParseFailsIfObjectHasCommentThatIsNotString   
)

Definition at line 449 of file testJson.cpp.

◆ TEST_F() [10/20]

TEST_F ( TestJson  ,
ParseFailsIfObjectHasUnknownTypeProperty   
)

Definition at line 329 of file testJson.cpp.

◆ TEST_F() [11/20]

TEST_F ( TestJson  ,
ParseFailsIfObjectHasUnsupportedValueType   
)

Definition at line 421 of file testJson.cpp.

◆ TEST_F() [12/20]

TEST_F ( TestJson  ,
ParseFailsIfObjectMissNameProperty   
)

Definition at line 357 of file testJson.cpp.

◆ TEST_F() [13/20]

TEST_F ( TestJson  ,
ParseFailsIfObjectMissTypeProperty   
)

Definition at line 316 of file testJson.cpp.

◆ TEST_F() [14/20]

TEST_F ( TestJson  ,
ParseFailsIfObjectMissValue   
)

Definition at line 370 of file testJson.cpp.

◆ TEST_F() [15/20]

TEST_F ( TestJson  ,
ParseFailsIfTypeIsNotString   
)

Definition at line 343 of file testJson.cpp.

◆ TEST_F() [16/20]

TEST_F ( TestJson  ,
ParseInvalidJsonThrowsNlohmannException   
)

Definition at line 23 of file testJson.cpp.

◆ TEST_F() [17/20]

TEST_F ( TestJson  ,
ParseLiteralKeyword   
)

Definition at line 206 of file testJson.cpp.

◆ TEST_F() [18/20]

TEST_F ( TestJson  ,
ParseOptionalKeywordComment   
)

Definition at line 247 of file testJson.cpp.

◆ TEST_F() [19/20]

TEST_F ( TestJson  ,
ParseValueKeywords   
)

Definition at line 39 of file testJson.cpp.

◆ TEST_F() [20/20]

TEST_F ( TestJson  ,
SerializeJsonKeywords   
)

Definition at line 464 of file testJson.cpp.