BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
folderbasedtest.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/tests/libtestmachinery/folderbasedtest.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_FOLDERBASEDTEST_H
16 #define BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_FOLDERBASEDTEST_H
17 
18 #include <gtest/gtest.h>
19 #include <string>
20 
21 //! Convenience class which creates a directory on disk for test content.
22 
23 class FolderBasedTest : public ::testing::Test {
24 public:
25  FolderBasedTest(const std::string& test_dir);
27 
28  std::string testDir() const;
29 
30  std::string testPath() const;
31 
32  std::string createEmptyDir(const std::string& subdir) const;
33 
34 protected:
35  std::string m_test_dir; //! main directory of given test
36 };
37 
38 #endif // BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_FOLDERBASEDTEST_H
Convenience class which creates a directory on disk for test content.
std::string createEmptyDir(const std::string &subdir) const
Creates an empty directory in main test folder.
std::string testDir() const
std::string m_test_dir
FolderBasedTest(const std::string &test_dir)
std::string testPath() const
Return full path to the test folder. Located in CMAKE_BINARY_DIR/test_output/<m_test_dir>.