| 37 | }; |
| 38 | |
| 39 | void RegisterCheckScopesAtExit() { |
| 40 | atexit([](){ |
| 41 | // Check we don't exit before the tests are done. |
| 42 | // (Make sure there's a keepalive for everything the test has scopes for.) |
| 43 | // Build with -sRUNTIME_DEBUG to trace keepalives. |
| 44 | assert(sScopeCount == 0); |
| 45 | }); |
| 46 | } |
| 47 | |
| 48 | static const wgpu::Instance instance = wgpuCreateInstance(nullptr); |
| 49 |