| 121 | */ |
| 122 | |
| 123 | int 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 | } |
nothing calls this directly
no test coverage detected