diff options
| author | Daniel Schemmel <daniel@schemmel.net> | 2023-06-28 23:21:39 +0000 |
|---|---|---|
| committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-07-10 16:53:14 +0200 |
| commit | 125fb26ceae09da92d17505071cad881ad31ba88 (patch) | |
| tree | 9230b368910a6e271e554ea0944fbca4f15216fd /unittests/KDAlloc/allocate.cpp | |
| parent | 3034ae5878f2b1f3216ab1a7d2706edf27c8ae4c (diff) | |
| download | klee-125fb26ceae09da92d17505071cad881ad31ba88.tar.gz | |
Simplify KDAlloc tests
Diffstat (limited to 'unittests/KDAlloc/allocate.cpp')
| -rw-r--r-- | unittests/KDAlloc/allocate.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/unittests/KDAlloc/allocate.cpp b/unittests/KDAlloc/allocate.cpp index c691e114..eb13d5e1 100644 --- a/unittests/KDAlloc/allocate.cpp +++ b/unittests/KDAlloc/allocate.cpp @@ -18,11 +18,7 @@ #include <iomanip> #include <iostream> -#if defined(USE_GTEST_INSTEAD_OF_MAIN) -int allocate_sample_test() { -#else -int main() { -#endif +void allocate_sample_test() { // initialize a factory and an associated allocator (1 MiB and no quarantine) klee::kdalloc::AllocatorFactory factory(static_cast<std::size_t>(1) << 20, 0); klee::kdalloc::Allocator allocator = factory.makeAllocator(); @@ -62,4 +58,6 @@ int main() { TEST(KDAllocDeathTest, AllocateSample) { ASSERT_EXIT(allocate_sample_test(), ::testing::ExitedWithCode(0), ""); } +#else +int main() { allocate_sample_test(); } #endif |
