BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
test_utils.test.cpp File Reference

Implements class CLASS? More...

Include dependency graph for test_utils.test.cpp:

Go to the source code of this file.

Classes

class  TestUtilsTest
 Testing functions in test_utils. More...
 

Functions

 TEST_F (TestUtilsTest, toVector)
 Testing toVector function. More...
 

Detailed Description

Implements class CLASS?

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file test_utils.test.cpp.

Function Documentation

◆ TEST_F()

TEST_F ( TestUtilsTest  ,
toVector   
)

Testing toVector function.

Definition at line 31 of file test_utils.test.cpp.

32 {
33  std::vector<int> expected_int = {1, 2, 3};
34  EXPECT_EQ(toVector<int>(1, 2, 3), expected_int);
35 
36  std::vector<double> expected_double = {1.1, 2.2, 3.3};
37  EXPECT_EQ(toVector<double>(1.1, 2.2, 3.3), expected_double);
38 
39  std::vector<std::string> expected_string = {"a", "bb", "ccc"};
40  EXPECT_EQ(toVector<std::string>("a", "bb", "ccc"), expected_string);
41 }