Files
Library/tests/package/CryptoAsyncOnly/main.cpp

20 lines
416 B
C++

#include <Void/Async/Executor.hpp>
#include <Void/Crypto/AsyncHash.hpp>
#include <Void/IO/Driver.hpp>
int main()
{
Void::Async::ManualExecutor exec;
auto drv = Void::IO::Driver::create(exec);
if (!drv.has_value()) {
return 1;
}
Void::CryptoAsync::AsyncFileHasher hasher{exec};
if (hasher.stats().active != 0) {
return 2;
}
(void)hasher.close_and_join();
(void)(*drv)->shutdown_and_join();
return 0;
}