8 #include <gtest/gtest.h>
12 using namespace ::testing;
14 TEST(Parsing, ParseOcmIfSubState) {
15 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"NotStarted"), daqif::NotStarted);
16 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Starting"), daqif::Starting);
17 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Acquiring"), daqif::Acquiring);
18 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Stopping"), daqif::Stopping);
19 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Stopped"), daqif::Stopped);
20 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Aborting"), daqif::Aborting);
21 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Aborted"), daqif::Aborted);
22 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"NotScheduled"), daqif::NotScheduled);
23 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Scheduled"), daqif::Scheduled);
24 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Transferring"), daqif::Transferring);
25 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Merging"), daqif::Merging);
26 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Releasing"), daqif::Releasing);
27 EXPECT_EQ(daqif::FromString<daqif::DaqSubState>(
"Completed"), daqif::Completed);
29 EXPECT_THROW(daqif::FromString<daqif::DaqSubState>(
"Not a state"), std::invalid_argument);
32 TEST(Parsing, ParseDaqState) {
33 EXPECT_EQ(daqif::FromString<daqif::DaqState>(
"StateAcquiring"), daqif::StateAcquiring);
34 EXPECT_EQ(daqif::FromString<daqif::DaqState>(
"StateMerging"), daqif::StateMerging);
35 EXPECT_EQ(daqif::FromString<daqif::DaqState>(
"StateCompleted"), daqif::StateCompleted);
37 EXPECT_THROW(daqif::FromString<daqif::DaqState>(
"Not a state"), std::invalid_argument);