Skip to content
Snippets Groups Projects
Commit 16052481 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

PyExportTest -> PyStandardTest

parent e66d7408
No related branches found
No related tags found
No related merge requests found
......@@ -72,9 +72,9 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../../TestMachinery
)
add_executable(PyExportStandardTest PyExportStandardTest.cpp PyExportTest.h PyExportTest.cpp)
target_link_libraries(PyExportStandardTest BornAgainCore BornAgainTestMachinery)
add_executable(PyStandardTest main.cpp PyStandardTest.h PyStandardTest.cpp)
target_link_libraries(PyStandardTest BornAgainCore BornAgainTestMachinery)
foreach(test_case ${test_cases})
add_test(PyStandardTest/${test_case}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/PyExportStandardTest ${test_case})
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/PyStandardTest ${test_case})
endforeach()
......@@ -2,7 +2,7 @@
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Tests/Functional/PyCore/export/PyExportTest.cpp
//! @file Tests/Functional/PyCore/export/PyStandardTest.cpp
//! @brief Implements class PyExportTest
//!
//! @homepage http://www.bornagainproject.org
......@@ -13,7 +13,7 @@
//
// ************************************************************************** //
#include "PyExportTest.h"
#include "PyStandardTest.h"
#include "FileSystemUtils.h"
#include "GISASSimulation.h"
#include "IntensityDataFunctions.h"
......@@ -24,7 +24,7 @@
#include <cstdio>
#include <fstream>
PyExportTest::PyExportTest(
PyStandardTest::PyStandardTest(
const std::string& name, const std::string& description,
GISASSimulation* reference_simulation, double threshold)
: IReferencedTest(name, description, threshold)
......@@ -33,14 +33,14 @@ PyExportTest::PyExportTest(
{
}
PyExportTest::~PyExportTest()
PyStandardTest::~PyStandardTest()
{
delete m_reference_simulation;
delete m_domain_simulation;
}
//! Runs simulation via a Python script and directly, and returns true if the results agree.
bool PyExportTest::runTest()
bool PyStandardTest::runTest()
{
// Set output data filename, and remove old output files
std::string output_name = FileSystemUtils::jointPath(PYEXPORT_TMP_DIR, getName());
......
......@@ -2,8 +2,8 @@
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Tests/Functional/PyCore/export/PyExportTest.h
//! @brief Defines class PyExportTest
//! @file Tests/Functional/PyCore/export/PyStandardTest.h
//! @brief Defines class PyStandardTest
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
......@@ -13,8 +13,8 @@
//
// ************************************************************************** //
#ifndef PYEXPORTTEST_H
#define PYEXPORTTEST_H
#ifndef PYSTANDARDTEST_H
#define PYSTANDARDTEST_H
#include "IReferencedTest.h"
#include "OutputData.h"
......@@ -23,12 +23,12 @@
//! Performs a given standard simulation, both directly and from a Python dump.
//! Invoked from PyExportStandardTest.
class PyExportTest : public IReferencedTest
class PyStandardTest : public IReferencedTest
{
public:
PyExportTest(const std::string& name, const std::string& description,
PyStandardTest(const std::string& name, const std::string& description,
class GISASSimulation* reference_simulation, double threshold);
virtual ~PyExportTest();
virtual ~PyStandardTest();
bool runTest() final;
......@@ -39,4 +39,4 @@ private:
class GISASSimulation* m_domain_simulation;
};
#endif // PYEXPORTTEST_H
#endif // PYSTANDARDTEST_H
......@@ -14,11 +14,11 @@
// ************************************************************************** //
#include "TestService.h"
#include "PyExportTest.h"
#include "PyStandardTest.h"
//! Runs PyExportTest on a standard simulation indicated by argv[1].
//! Runs PyStandardTest on a standard simulation indicated by argv[1].
int main(int argc, char** argv)
{
return TestService<PyExportTest>().execute(argc, argv) ? 0 : 1;
return TestService<PyStandardTest>().execute(argc, argv) ? 0 : 1;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment