Tue, 04 Oct 2022 19:25:07 +0200
fix over-optimization of strstr
1. it's actually less performant to frequently read bytes
from an array instead of using the native word length
2. the SBO buffer should be local and not static to allow
multi-threading usage
510
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
1 | # Load Google Test Framework |
522
b91c50d023f4
add [[maybe_unused]] attributed to params of mocked function
Mike Becker <universe@uap-core.de>
parents:
518
diff
changeset
|
2 | set(CMAKE_CXX_STANDARD 17) |
510
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
3 | |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
4 | include(FetchContent) |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
5 | FetchContent_Declare( |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
6 | googletest |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
7 | GIT_REPOSITORY https://github.com/google/googletest.git |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
8 | GIT_TAG e2239ee6043f73722e7aa812a459f54a28552929 # release 1.11.0 |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
9 | ) |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
10 | # For Windows: Prevent overriding the parent project's compiler/linker settings |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
11 | set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
12 | FetchContent_MakeAvailable(googletest) |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
13 | include(GoogleTest) |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
14 | message(STATUS "Google Test made available") |
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
15 | |
512
096d206b63f9
compile only one single binary for tests
Mike Becker <universe@uap-core.de>
parents:
511
diff
changeset
|
16 | add_executable(ucxtest |
096d206b63f9
compile only one single binary for tests
Mike Becker <universe@uap-core.de>
parents:
511
diff
changeset
|
17 | test_allocator.cpp |
583
0f3c9662f9b5
add tests and missing implementations for strings
Mike Becker <universe@uap-core.de>
parents:
571
diff
changeset
|
18 | test_string.cpp |
530 | 19 | test_buffer.cpp |
517
b3baaf9b7e3c
migrate list tests to gtest
Mike Becker <universe@uap-core.de>
parents:
515
diff
changeset
|
20 | test_list.cpp |
515
6d3909bf1609
migrate tree tests to gtest
Mike Becker <universe@uap-core.de>
parents:
512
diff
changeset
|
21 | test_tree.cpp |
556 | 22 | test_map.cpp |
571
f83583a0bbac
#201 - add mempool implementation
Mike Becker <universe@uap-core.de>
parents:
556
diff
changeset
|
23 | test_basic_mempool.cpp |
512
096d206b63f9
compile only one single binary for tests
Mike Becker <universe@uap-core.de>
parents:
511
diff
changeset
|
24 | selftest.cpp |
518
74d0372f5c6f
improve testing allocator + add tests for it
Mike Becker <universe@uap-core.de>
parents:
517
diff
changeset
|
25 | util_allocator.cpp |
510
133ac0f8f3fc
add googletest framework
Mike Becker <universe@uap-core.de>
parents:
427
diff
changeset
|
26 | ) |
512
096d206b63f9
compile only one single binary for tests
Mike Becker <universe@uap-core.de>
parents:
511
diff
changeset
|
27 | target_link_libraries(ucxtest PRIVATE ucx_static gtest_main) |
096d206b63f9
compile only one single binary for tests
Mike Becker <universe@uap-core.de>
parents:
511
diff
changeset
|
28 | gtest_discover_tests(ucxtest) |