Skip to content

Commit

Permalink
Merge pull request #7 from MetOffice/feature/rename_tests2
Browse files Browse the repository at this point in the history
Rename of Tests, Again
  • Loading branch information
phlndrwd authored Aug 11, 2023
2 parents f072957 + 8fa4f4a commit 8347423
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink

file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testinput)
list(APPEND monio_testinput
testinput/background_basic.yaml
testinput/background_full.yaml
testinput/state_basic.yaml
testinput/state_full.yaml
)

foreach(FILENAME ${monio_testinput})
Expand All @@ -47,15 +47,15 @@ ecbuild_add_test(TARGET monio_coding_norms
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/test)

ecbuild_add_test(TARGET test_background_basic
SOURCES mains/TestBackgroundBasic.cc
ARGS "testinput/background_basic.yaml"
ecbuild_add_test(TARGET test_state_basic
SOURCES mains/TestStateBasic.cc
ARGS "testinput/state_basic.yaml"
LIBS monio
MPI 4)

ecbuild_add_test(TARGET test_background_full
SOURCES mains/TestBackgroundFull.cc
ARGS "testinput/background_full.yaml"
ecbuild_add_test(TARGET test_state_full
SOURCES mains/TestStateFull.cc
ARGS "testinput/state_full.yaml"
LIBS monio
MPI 4)

Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# This software is licensed under the terms of the Apache Licence Version 2.0 #
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. #
#############################################################################*/
#include "../monio/BackgroundFull.h"
#include "../monio/StateBasic.h"
#include "oops/runs/Run.h"

int main(int argc, char ** argv) {
oops::Run run(argc, argv);
monio::test::BackgroundFull tests;
monio::test::StateBasic tests;
return run.execute(tests);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# This software is licensed under the terms of the Apache Licence Version 2.0 #
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. #
#############################################################################*/
#include "../monio/BackgroundBasic.h"
#include "../monio/StateFull.h"
#include "oops/runs/Run.h"

int main(int argc, char ** argv) {
oops::Run run(argc, argv);
monio::test::BackgroundBasic tests;
monio::test::StateFull tests;
return run.execute(tests);
}
10 changes: 5 additions & 5 deletions test/monio/BackgroundBasic.h → test/monio/StateBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ void testFunction() {
}
}

class BackgroundBasic : public oops::Test{
class StateBasic : public oops::Test{
public:
BackgroundBasic() {}
virtual ~BackgroundBasic() {}
StateBasic() {}
virtual ~StateBasic() {}
private:
std::string testid() const override {
return "monio::test::BackgroundBasic";
return "monio::test::StateBasic";
}

void register_tests() const override {
std::vector<eckit::testing::Test>& ts = eckit::testing::specification();

std::function<void(std::string&, int&, int)> testFn =
[](std::string &, int&, int) { testFunction(); };
ts.push_back(eckit::testing::Test("monio/test_background_basic", testFn));
ts.push_back(eckit::testing::Test("monio/test_state_basic", testFn));
}
void clear() const override {}
};
Expand Down
10 changes: 5 additions & 5 deletions test/monio/BackgroundFull.h → test/monio/StateFull.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,22 @@ void main() {
readOutput(outputFilePath);
}

class BackgroundFull : public oops::Test{
class StateFull : public oops::Test{
public:
BackgroundFull() {}
virtual ~BackgroundFull() {}
StateFull() {}
virtual ~StateFull() {}

private:
std::string testid() const override {
return "monio::test::BackgroundFull";
return "monio::test::StateFull";
}

void register_tests() const override {
std::vector<eckit::testing::Test>& ts = eckit::testing::specification();

std::function<void(std::string&, int&, int)> mainFunction =
[&](std::string&, int&, int) { main(); };
ts.push_back(eckit::testing::Test("monio/test_background_full", mainFunction));
ts.push_back(eckit::testing::Test("monio/test_state_full", mainFunction));
}
void clear() const override {}
};
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 8347423

Please sign in to comment.