enums_test.cpp 453 Bytes
Newer Older
Matteo's avatar
Matteo committed
1
2
#include "../src/lib/enums.h"

Matteo's avatar
update  
Matteo committed
3
#include <gtest/gtest.h>
Matteo's avatar
Matteo committed
4

Matteo's avatar
update  
Matteo committed
5
6
7
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>

Matteo's avatar
Matteo committed
8
TEST(IrregularityType, toString) { EXPECT_EQ(irregularityTypeToString(IrregularityType::WOW_AND_FLUTTER), "wf"); }
Matteo's avatar
update  
Matteo committed
9
10
11
12
13

TEST(IrregularityType, fromString) {
    EXPECT_EQ(irregularityTypeFromString("wf"), IrregularityType::WOW_AND_FLUTTER);
    EXPECT_THROW(irregularityTypeFromString("not_exists"), std::invalid_argument);
}