#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "ParamHandler.hpp"
#include "Utilities/utilities.h"
Go to the source code of this file.
|
| TEST (YAML, yaml_category_read) |
|
TEST |
( |
YAML |
, |
|
|
yaml_category_read |
|
|
) |
| |
Definition at line 7 of file test_yaml.cpp.
References getConfigDirectoryPath().
9 EXPECT_TRUE(paramHandler.fileOpenedSuccessfully());
11 std::vector<double> c1p2, c2p2;
12 EXPECT_TRUE(paramHandler.getValue(
"category-1",
"parameter-1", c1p1));
13 EXPECT_TRUE(paramHandler.getValue(
"category-2",
"parameter-1", c2p1));
14 EXPECT_TRUE(paramHandler.getVector(
"category-1",
"parameter-2", c1p2));
15 EXPECT_TRUE(paramHandler.getVector(
"category-2",
"parameter-2", c2p2));
17 EXPECT_TRUE(c1p1 == 12.);
18 EXPECT_TRUE(c1p2[0] == 1.);
19 EXPECT_TRUE(c1p2[1] == 2.);
20 EXPECT_TRUE(c1p2[2] == 3.);
21 EXPECT_TRUE(c1p2.size() == 3);
23 EXPECT_TRUE(c2p1 == 23.);
24 EXPECT_TRUE(c2p2[0] == 2.);
25 EXPECT_TRUE(c2p2[1] == 3.);
26 EXPECT_TRUE(c2p2.size() == 2);
28 EXPECT_FALSE(paramHandler.getValue(
"notARealKey", c1p1));
29 ParamHandler badHandler(
"not-a-real-file.potato");
30 EXPECT_FALSE(badHandler.fileOpenedSuccessfully());
std::string getConfigDirectoryPath()