Add unit tests for the tid allocator (#2519)

Add simple infrastructure to add more unit tests in the future. At the moment tests
are only executed on Linux, but can be extended to other platforms if needed.

Use https://github.com/google/googletest/ as a framework.
This commit is contained in:
Marcin Kolny
2023-09-04 06:21:10 +01:00
committed by GitHub
parent 1ff41ebdc2
commit 8c2dc1d011
6 changed files with 160 additions and 2 deletions

21
tests/unit/main.cpp Normal file
View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2023 Amazon.com Inc. or its affiliates. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#include <gtest/gtest.h>
#include "wasm_runtime_common.h"
int
main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
if (!wasm_runtime_init()) {
return -1;
}
int ret = RUN_ALL_TESTS();
wasm_runtime_destroy();
return ret;
}