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
32
33
34
35
36
37
38
39
/** @file
* This file is left mostly empty so that catch doesn't need
* slow (~16s) recompilation each time unit tests are edited
*
* @author Tyson Jones
*/
/** Use our modified Catch in custom-main mode (main defined below).
* catch.hpp was modified to, in distributed mode, output only once.
*/
/** The global QuESTEnv instance, to be created and destroyed once in this
* main(), so that the MPI environment is correctly created once when running
* distributed unit tests
*/
QuESTEnv QUEST_ENV;
/** Redefinition of QuEST_validation's invalidQuESTInputError function, called when a
* user passes an incorrect parameter (e.g. an negative qubit index). This is
* redefined here to, in lieu of printing and exiting, throw a C++ exception
* which can be caught (and hence unit tested for) by Catch2
*/
extern "C" void
/** Explicit declaration of main to create (destroy) the QuESTEnv before (after)
* invoking the Catch unit tests
*/
int