ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
Classes | Namespaces | Functions | Variables
testStartDaqV2.cpp File Reference
#include <daq/json/startDaqV2.hpp>
#include <gtest/gtest.h>

Go to the source code of this file.

Classes

class  daq::json::TestParseStartDaqV2Spec
 

Namespaces

 daq
 
 daq::json
 

Functions

 daq::json::TEST_F (TestParseStartDaqV2Spec, RoundTripParsing)
 
 daq::json::TEST_F (TestParseStartDaqV2Spec, SuccessfulTemplate)
 
 EXPECT_EQ (meta.rr_uri, "zpb.rr://meta")
 
 EXPECT_EQ (meta.source_name, "metadata")
 
 EXPECT_EQ (meta.initial_keywords, InitialKeywords::User)
 
 ASSERT_EQ (meta.keyword_rules.size(), 1u)
 
 ASSERT_EQ (transform.selection_patterns.size(), 1u)
 
 EXPECT_EQ (transform.selection_patterns[0], "+e INS1 *")
 
 EXPECT_EQ (transform.regex, "INS1 ")
 
 EXPECT_EQ (transform.format, "INS2 ")
 
 EXPECT_EQ (kws.source_name, "keywords")
 
 EXPECT_EQ (file.source_name, "file")
 
 TEST_F (TestParseStartDaqV2Spec, EmptyKeywordRulesModelledAsEmptyOptional)
 
 TEST_F (TestParseStartDaqV2Spec, NoIdIsModelledAsEmptyString)
 
 TEST_F (TestParseStartDaqV2Spec, EmptydIsAllowed)
 
 TEST_F (TestParseStartDaqV2Spec, AwaitCompletionIntervalIsOptional)
 
 TEST_F (TestParseStartDaqV2Spec, AwaitCompletionIntervalAcceptsIntegers)
 
 TEST_F (TestParseStartDaqV2Spec, AwaitCompletionIntervalMustBePositive)
 

Variables

daq::json::TestParseStartDaqV2Spec daq::json::_json
 
nlohmann::json daq::json::m_spec
 
auto const & transform = std::get<KeywordTransform>(meta.keyword_rules.at(0))
 

Detailed Description

Definition in file testStartDaqV2.cpp.

Function Documentation

◆ ASSERT_EQ() [1/2]

ASSERT_EQ ( meta.keyword_rules.  size(),
1u   
)

◆ ASSERT_EQ() [2/2]

ASSERT_EQ ( transform.selection_patterns.  size(),
1u   
)

◆ EXPECT_EQ() [1/8]

EXPECT_EQ ( file.  source_name,
"file"   
)

◆ EXPECT_EQ() [2/8]

EXPECT_EQ ( kws.  source_name,
"keywords"   
)

◆ EXPECT_EQ() [3/8]

EXPECT_EQ ( meta.  initial_keywords,
InitialKeywords::User   
)

◆ EXPECT_EQ() [4/8]

EXPECT_EQ ( meta.  rr_uri,
"zpb.rr://meta"   
)

◆ EXPECT_EQ() [5/8]

EXPECT_EQ ( meta.  source_name,
"metadata"   
)

◆ EXPECT_EQ() [6/8]

EXPECT_EQ ( transform.  format,
"INS2 "   
)

◆ EXPECT_EQ() [7/8]

EXPECT_EQ ( transform.  regex,
"INS1 "   
)

◆ EXPECT_EQ() [8/8]

EXPECT_EQ ( transform.  selection_patterns[0],
"+e INS1 *"   
)

◆ TEST_F() [1/6]

TEST_F ( TestParseStartDaqV2Spec  ,
AwaitCompletionIntervalAcceptsIntegers   
)

Definition at line 200 of file testStartDaqV2.cpp.

◆ TEST_F() [2/6]

TEST_F ( TestParseStartDaqV2Spec  ,
AwaitCompletionIntervalIsOptional   
)

Definition at line 193 of file testStartDaqV2.cpp.

◆ TEST_F() [3/6]

TEST_F ( TestParseStartDaqV2Spec  ,
AwaitCompletionIntervalMustBePositive   
)

Definition at line 207 of file testStartDaqV2.cpp.

◆ TEST_F() [4/6]

TEST_F ( TestParseStartDaqV2Spec  ,
EmptydIsAllowed   
)

Definition at line 187 of file testStartDaqV2.cpp.

◆ TEST_F() [5/6]

TEST_F ( TestParseStartDaqV2Spec  ,
EmptyKeywordRulesModelledAsEmptyOptional   
)

Definition at line 155 of file testStartDaqV2.cpp.

◆ TEST_F() [6/6]

TEST_F ( TestParseStartDaqV2Spec  ,
NoIdIsModelledAsEmptyString   
)

Definition at line 181 of file testStartDaqV2.cpp.

Variable Documentation

◆ transform

auto const& transform = std::get<KeywordTransform>(meta.keyword_rules.at(0))

Definition at line 139 of file testStartDaqV2.cpp.