BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Defines class CLASS? More...
Go to the source code of this file.
Namespaces | |
ModelView | |
materialitems.h Collection of materials to populate MaterialModel. | |
TestUtils | |
Various common utils for unit tests. | |
Functions | |
template<typename T > | |
void | TestUtils::clean_items (T &items) |
Deletes items in the container and cleans container afterwards. More... | |
template<typename T > | |
auto | TestUtils::create_pointers (const std::vector< std::unique_ptr< T >> &vec) |
Creates vector of pointers from vector of unique_ptr. More... | |
template<typename B , typename D > | |
auto | TestUtils::create_row (int ncolumns) |
Creates vector of unique_ptr of given type. More... | |
std::string | TestUtils::CreateEmptyFile (const std::string &dirname, const std::string &fileName) |
Helper function to create empty file in a given directory (directory should exist). More... | |
std::string | TestUtils::CreateTestDirectory (const std::string &test_sub_dir) |
Creates test directory in main test folder and returns full path. More... | |
std::string | TestUtils::CreateTestFile (const std::string &dirname, const std::string &fileName) |
Helper function to create test file in a given directory (directory should exist). More... | |
QString | TestUtils::JsonToString (const QJsonObject &object) |
QJsonDocument | TestUtils::LoadJson (const std::string &fileName) |
QString | TestUtils::ModelToJsonString (ModelView::SessionModel &model) |
Returns string representing serialized json content of the model. More... | |
void | TestUtils::SaveJson (const QJsonArray &object, const std::string &fileName) |
void | TestUtils::SaveJson (const QJsonObject &object, const std::string &fileName) |
std::string | TestUtils::TestDirectoryPath (const std::string &test_sub_dir) |
Returns full path to the main test folder in CMAKE_BINARY_DIR. More... | |
std::string | TestUtils::TestFileName (const std::string &test_sub_dir, const std::string &file_name) |
Returns full path to the file in test directory. More... | |
std::string | TestUtils::TestOutputDir () |
Returns full path to the main test folder, as defined by CMake at compile time. More... | |
template<typename T , typename... Args> | |
std::vector< T > | TestUtils::toVector (Args &&... args) |
Creates vector of T from argument list. Used in EXPECT_EQ macros for convenience. More... | |
Defines class CLASS?
Collection of utility functions for various unit tests.
Definition in file test_utils.h.