-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest_updaterExample.cpp
More file actions
31 lines (22 loc) · 955 Bytes
/
test_updaterExample.cpp
File metadata and controls
31 lines (22 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// use the catch file but do not add the #define CATCH_CONFIG_MAIN !!
#include "../utility/extern/catchorg/catch2/catch.hpp"
#include <LeMonADE/core/Ingredients.h>
#include <LeMonADE/feature/FeatureMoleculesIO.h>
#include "../updater/UpdaterExample.h"
typedef LOKI_TYPELIST_1(FeatureMoleculesIO) Features;
typedef ConfigureSystem<VectorInt3,Features,4> Config;
typedef Ingredients<Config> IngredientsType;
TEST_CASE( "run the updater" ) {
// empty instance of ingredients
IngredientsType ingredients;
uint32_t myParameter(42);
// just check for errors to be thrown
UpdaterExample<IngredientsType> Hugo1 (ingredients, myParameter);
REQUIRE_NOTHROW( Hugo1.initialize() );
REQUIRE_NOTHROW( Hugo1.execute() );
REQUIRE_NOTHROW( Hugo1.cleanup() );
// check a condition (should return TRUE), for instance
CHECK(myParameter == 42);
// check something to return false
CHECK_FALSE( myParameter == 2578472);
}