ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
testKeyword.cpp File Reference

Unit tests for json handling. More...

#include <algorithm>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <nlohmann/json.hpp>
#include <ostream>
#include <random>
#include <daq/error/report.hpp>
#include <daq/fits/json.hpp>
#include "matchers.hpp"

Go to the source code of this file.

Classes

class  TestLiteralKeyword
 
class  TestKeyword< Type >
 Note that test cases must use TypeParam and cannot declare templated aliases. More...
 

Typedefs

using Types = ::testing::Types< ValueKeyword, EsoKeyword >
 

Functions

 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords1)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords4)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords3)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords5)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords6)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords7)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords8)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords9)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords10)
 
 TEST_F (TestLiteralKeyword, ConstructStrangeKeywords11)
 
 TEST_F (TestLiteralKeyword, ConstructRegularKeywords)
 
 TEST_F (TestLiteralKeyword, ValueKeywordTypes)
 
 TEST_F (TestLiteralKeyword, StrangeValueKeywordTypes)
 
 TEST_F (TestLiteralKeyword, InvalidEsoKeywordTypes)
 
 TEST_F (TestLiteralKeyword, EsoKeywordTypes)
 
 TEST_F (TestLiteralKeyword, EsoKeywordStringParsing)
 
 TEST_F (TestLiteralKeyword, CommentaryKeywordTypes)
 
 TEST_F (TestLiteralKeyword, EqualityOperator)
 
 TEST_F (TestLiteralKeyword, OstreamOperator)
 
 TYPED_TEST_CASE (TestKeyword, Types)
 
 TYPED_TEST (TestKeyword, Construction)
 
 TYPED_TEST (TestKeyword, OptionalComment)
 
 TYPED_TEST (TestKeyword, ConstructFromString)
 Test that construction of keyword from a C string is stored as std::string and not a bool, which is the implicitly converted type for the variant construction otherwise.
 
 TYPED_TEST (TestKeyword, Equality)
 
 TYPED_TEST (TestKeyword, Ordering)
 
 TYPED_TEST (TestKeyword, OstreamOperator)
 
 TEST (TestKeywordCombinations, OperatorLessComparesKeywordName)
 
 TEST (TestKeywordCombinations, NameEquals)
 
 TEST (KeywordVector, UpdateKeywords)
 
 TEST (KeywordVector, InsertKeywordsEnd)
 
 TEST (KeywordVector, InsertKeywordsBegin)
 
 TEST (KeywordVector, InsertKeywordsMiddle)
 
 TEST (TestFormatting, StandardKeywordFormatter)
 
 TEST (TestFormatting, ValueKeyword)
 
 TEST (TestFormatting, EsoKeyword)
 
 TEST (TestFormatting, LiteralKeyword)
 
 TEST (TestFormatting, TooLongKeywords)
 
 TEST (TestFormatting, KeywordVariant)
 
 TEST (TestStandardSortV1, StableSortsValueKeywords)
 
 TEST (TestStandardSortV1, StableSortsByKeywordType)
 
 TEST (TestStandardSortV1, EsoKeywordsAreSortedByCategory)
 
 TEST (TestStandardSortV1, EsoKeywordsAreSortedByNumberedCategory)
 
 TEST (TestStandardSortV1, EsoKeywordAreSortedEvenIfCloslyMatched)
 
 TEST (TestStandardSortV1, EsoKeywordAreSortedEvenIfStrange)
 
 TEST (TestStandardSortV1, CommentsSortedByName)
 
 TEST (TestStandardSortV1, EsoKeywordsAreSortedAlphabetically)
 

Detailed Description

Unit tests for json handling.

Definition in file testKeyword.cpp.

Typedef Documentation

◆ Types

using Types = ::testing::Types<ValueKeyword, EsoKeyword>

Definition at line 359 of file testKeyword.cpp.

Function Documentation

◆ TEST() [1/20]

TEST ( KeywordVector  ,
InsertKeywordsBegin   
)

Definition at line 627 of file testKeyword.cpp.

◆ TEST() [2/20]

TEST ( KeywordVector  ,
InsertKeywordsEnd   
)

Definition at line 594 of file testKeyword.cpp.

◆ TEST() [3/20]

TEST ( KeywordVector  ,
InsertKeywordsMiddle   
)

Definition at line 658 of file testKeyword.cpp.

◆ TEST() [4/20]

TEST ( KeywordVector  ,
UpdateKeywords   
)

Definition at line 544 of file testKeyword.cpp.

◆ TEST() [5/20]

TEST ( TestFormatting  ,
EsoKeyword   
)

Definition at line 734 of file testKeyword.cpp.

◆ TEST() [6/20]

TEST ( TestFormatting  ,
KeywordVariant   
)

Definition at line 812 of file testKeyword.cpp.

◆ TEST() [7/20]

TEST ( TestFormatting  ,
LiteralKeyword   
)

Definition at line 758 of file testKeyword.cpp.

◆ TEST() [8/20]

TEST ( TestFormatting  ,
StandardKeywordFormatter   
)

Definition at line 692 of file testKeyword.cpp.

◆ TEST() [9/20]

TEST ( TestFormatting  ,
TooLongKeywords   
)

Definition at line 788 of file testKeyword.cpp.

◆ TEST() [10/20]

TEST ( TestFormatting  ,
ValueKeyword   
)

Definition at line 710 of file testKeyword.cpp.

◆ TEST() [11/20]

TEST ( TestKeywordCombinations  ,
NameEquals   
)

Definition at line 513 of file testKeyword.cpp.

◆ TEST() [12/20]

TEST ( TestKeywordCombinations  ,
OperatorLessComparesKeywordName   
)

Definition at line 471 of file testKeyword.cpp.

◆ TEST() [13/20]

TEST ( TestStandardSortV1  ,
CommentsSortedByName   
)

Definition at line 977 of file testKeyword.cpp.

◆ TEST() [14/20]

TEST ( TestStandardSortV1  ,
EsoKeywordAreSortedEvenIfCloslyMatched   
)

Definition at line 938 of file testKeyword.cpp.

◆ TEST() [15/20]

TEST ( TestStandardSortV1  ,
EsoKeywordAreSortedEvenIfStrange   
)

Definition at line 954 of file testKeyword.cpp.

◆ TEST() [16/20]

TEST ( TestStandardSortV1  ,
EsoKeywordsAreSortedAlphabetically   
)

Definition at line 997 of file testKeyword.cpp.

◆ TEST() [17/20]

TEST ( TestStandardSortV1  ,
EsoKeywordsAreSortedByCategory   
)

Definition at line 863 of file testKeyword.cpp.

◆ TEST() [18/20]

TEST ( TestStandardSortV1  ,
EsoKeywordsAreSortedByNumberedCategory   
)

Definition at line 911 of file testKeyword.cpp.

◆ TEST() [19/20]

TEST ( TestStandardSortV1  ,
StableSortsByKeywordType   
)

Definition at line 840 of file testKeyword.cpp.

◆ TEST() [20/20]

TEST ( TestStandardSortV1  ,
StableSortsValueKeywords   
)

Definition at line 824 of file testKeyword.cpp.

◆ TEST_F() [1/19]

TEST_F ( TestLiteralKeyword  ,
CommentaryKeywordTypes   
)

Definition at line 287 of file testKeyword.cpp.

◆ TEST_F() [2/19]

TEST_F ( TestLiteralKeyword  ,
ConstructRegularKeywords   
)

Definition at line 127 of file testKeyword.cpp.

◆ TEST_F() [3/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords1   
)

Definition at line 45 of file testKeyword.cpp.

◆ TEST_F() [4/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords10   
)

Definition at line 109 of file testKeyword.cpp.

◆ TEST_F() [5/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords11   
)

Definition at line 118 of file testKeyword.cpp.

◆ TEST_F() [6/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords3   
)

Definition at line 60 of file testKeyword.cpp.

◆ TEST_F() [7/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords4   
)

Definition at line 52 of file testKeyword.cpp.

◆ TEST_F() [8/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords5   
)

Definition at line 68 of file testKeyword.cpp.

◆ TEST_F() [9/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords6   
)

Definition at line 76 of file testKeyword.cpp.

◆ TEST_F() [10/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords7   
)

Definition at line 84 of file testKeyword.cpp.

◆ TEST_F() [11/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords8   
)

Definition at line 92 of file testKeyword.cpp.

◆ TEST_F() [12/19]

TEST_F ( TestLiteralKeyword  ,
ConstructStrangeKeywords9   
)

Definition at line 100 of file testKeyword.cpp.

◆ TEST_F() [13/19]

TEST_F ( TestLiteralKeyword  ,
EqualityOperator   
)

Definition at line 322 of file testKeyword.cpp.

◆ TEST_F() [14/19]

TEST_F ( TestLiteralKeyword  ,
EsoKeywordStringParsing   
)

Definition at line 224 of file testKeyword.cpp.

◆ TEST_F() [15/19]

TEST_F ( TestLiteralKeyword  ,
EsoKeywordTypes   
)

Definition at line 170 of file testKeyword.cpp.

◆ TEST_F() [16/19]

TEST_F ( TestLiteralKeyword  ,
InvalidEsoKeywordTypes   
)

Definition at line 163 of file testKeyword.cpp.

◆ TEST_F() [17/19]

TEST_F ( TestLiteralKeyword  ,
OstreamOperator   
)

Definition at line 332 of file testKeyword.cpp.

◆ TEST_F() [18/19]

TEST_F ( TestLiteralKeyword  ,
StrangeValueKeywordTypes   
)

Definition at line 158 of file testKeyword.cpp.

◆ TEST_F() [19/19]

TEST_F ( TestLiteralKeyword  ,
ValueKeywordTypes   
)

Definition at line 137 of file testKeyword.cpp.

◆ TYPED_TEST() [1/6]

TYPED_TEST ( TestKeyword  ,
ConstructFromString   
)

Test that construction of keyword from a C string is stored as std::string and not a bool, which is the implicitly converted type for the variant construction otherwise.

Definition at line 396 of file testKeyword.cpp.

◆ TYPED_TEST() [2/6]

TYPED_TEST ( TestKeyword  ,
Construction   
)

Definition at line 362 of file testKeyword.cpp.

◆ TYPED_TEST() [3/6]

TYPED_TEST ( TestKeyword  ,
Equality   
)

Definition at line 404 of file testKeyword.cpp.

◆ TYPED_TEST() [4/6]

TYPED_TEST ( TestKeyword  ,
OptionalComment   
)

Definition at line 385 of file testKeyword.cpp.

◆ TYPED_TEST() [5/6]

TYPED_TEST ( TestKeyword  ,
Ordering   
)

Definition at line 421 of file testKeyword.cpp.

◆ TYPED_TEST() [6/6]

TYPED_TEST ( TestKeyword  ,
OstreamOperator   
)

Definition at line 432 of file testKeyword.cpp.

◆ TYPED_TEST_CASE()

TYPED_TEST_CASE ( TestKeyword  ,
Types   
)