main.cpp File Reference
#include "catch.hpp"
#include "QuEST.h"

Go to the source code of this file.

Macros

#define CATCH_CONFIG_RUNNER
 Use our modified Catch in custom-main mode (main defined below). More...
 

Functions

void invalidQuESTInputError (const char *errMsg, const char *errFunc)
 Redefinition of QuEST_validation's invalidQuESTInputError function, called when a user passes an incorrect parameter (e.g. More...
 
int main (int argc, char *argv[])
 Explicit declaration of main to create (destroy) the QuESTEnv before (after) invoking the Catch unit tests. More...
 

Variables

QuESTEnv QUEST_ENV
 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. More...
 

Detailed Description

This file is left mostly empty so that catch doesn't need slow (~16s) recompilation each time unit tests are edited

Author
Tyson Jones

Definition in file main.cpp.

Macro Definition Documentation

◆ CATCH_CONFIG_RUNNER

#define CATCH_CONFIG_RUNNER

Use our modified Catch in custom-main mode (main defined below).

catch.hpp was modified to, in distributed mode, output only once.

Definition at line 11 of file main.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Explicit declaration of main to create (destroy) the QuESTEnv before (after) invoking the Catch unit tests.

Definition at line 34 of file main.cpp.

34  {
36  int result = Catch::Session().run( argc, argv );
38  return result;
39 }

References createQuESTEnv(), destroyQuESTEnv(), and QUEST_ENV.

Variable Documentation

◆ QUEST_ENV

QuESTEnv QUEST_ENV

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.

The single QuESTEnv environment created before the Catch tests begin, and destroyed thereafter.

Definition at line 20 of file main.cpp.

Referenced by areEqual(), deleteFilesWithPrefixSynch(), main(), TEST_CASE(), toQMatrix(), toQureg(), toQVector(), and writeToFileSynch().

void destroyQuESTEnv(QuESTEnv env)
Destroy the QuEST environment.
QuESTEnv QUEST_ENV
The global QuESTEnv instance, to be created and destroyed once in this main(), so that the MPI enviro...
Definition: main.cpp:20
QuESTEnv createQuESTEnv(void)
Create the QuEST execution environment.