MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / main

Function main

tests/main.cpp:123–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 */
122
123int main(int argc, char* argv[]) {
124
125 // prepare QuEST before anything else, since many
126 // testing utility functions repurpose QuEST ones
127 initQuESTEnv();
128 setInputErrorHandler(validationErrorHandler);
129
130 // ensure RNG consensus among all nodes
131 setRandomTestStateSeeds();
132
133 // prepare persistent Quregs
134 createCachedQuregs();
135 createCachedFullStateDiagMatrs();
136
137 // disable Catch2 output on non-root nodes
138 if (getQuESTEnv().rank != 0)
139 std::cout.rdbuf(nullptr);
140
141 // launch Catch2, triggering above event listener
142 int result = Catch::Session().run( argc, argv );
143
144 destroyCachedFullStateDiagMatrs();
145 destroyCachedQuregs();
146 finalizeQuESTEnv();
147 return result;
148}

Callers

nothing calls this directly

Calls 9

initQuESTEnvFunction · 0.85
setInputErrorHandlerFunction · 0.85
createCachedQuregsFunction · 0.85
getQuESTEnvFunction · 0.85
destroyCachedQuregsFunction · 0.85
finalizeQuESTEnvFunction · 0.85
setRandomTestStateSeedsFunction · 0.50

Tested by

no test coverage detected