FV3 Bundle
TestFixture.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2017 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef TEST_TESTFIXTURE_H_
12 #define TEST_TESTFIXTURE_H_
13 
14 #pragma once
15 
16 #include "eckit/runtime/Main.h"
17 #include "oops/util/LibOOPS.h"
18 
19 namespace test {
20 
21 // -----------------------------------------------------------------------------
22 
23 struct TestFixture {
25  // This method of initializing boost is currently only used for the Lorentz model
26  // (as of August, 2018)
27  eckit::Main::initialise(boost::unit_test::framework::master_test_suite().argc,
28  boost::unit_test::framework::master_test_suite().argv);
29  }
30 
32  oops::LibOOPS::instance().finalise();
33  }
34 };
35 
36 // -----------------------------------------------------------------------------
37 
38 } // namespace test
39 
40 #endif // TEST_TESTFIXTURE_H_