From 688bb608d949f0d990f248ecac1ac5abefc6ef9a Mon Sep 17 00:00:00 2001 From: doodspav Date: Sun, 14 Jul 2024 21:48:49 +0100 Subject: [PATCH] GHI #32 Change UtApiAlign to UtInternalAlign [skip ci] --- test/kind/ut/CMakeLists.txt | 2 +- test/kind/ut/{api => internal}/CMakeLists.txt | 2 +- test/kind/ut/{api => internal}/align.cpp | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) rename test/kind/ut/{api => internal}/CMakeLists.txt (82%) rename test/kind/ut/{api => internal}/align.cpp (78%) diff --git a/test/kind/ut/CMakeLists.txt b/test/kind/ut/CMakeLists.txt index 4194fd724..2145af367 100644 --- a/test/kind/ut/CMakeLists.txt +++ b/test/kind/ut/CMakeLists.txt @@ -4,4 +4,4 @@ add_custom_target(${test_target_name}-ut) add_dependencies(${test_target_name} ${test_target_name}-ut) # add all subdirectories -add_subdirectory(api) +add_subdirectory(internal) diff --git a/test/kind/ut/api/CMakeLists.txt b/test/kind/ut/internal/CMakeLists.txt similarity index 82% rename from test/kind/ut/api/CMakeLists.txt rename to test/kind/ut/internal/CMakeLists.txt index 2f715fdaa..da911491b 100644 --- a/test/kind/ut/api/CMakeLists.txt +++ b/test/kind/ut/internal/CMakeLists.txt @@ -1,7 +1,7 @@ # ---- Create Tests ---- create_ut( - NAME UtApiAlign + NAME UtInternalAlign SOURCE align.cpp "${PATOMIC_SOURCE_DIR}/src/api/align.c" diff --git a/test/kind/ut/api/align.cpp b/test/kind/ut/internal/align.cpp similarity index 78% rename from test/kind/ut/api/align.cpp rename to test/kind/ut/internal/align.cpp index 6734d4923..653c6f12a 100644 --- a/test/kind/ut/api/align.cpp +++ b/test/kind/ut/internal/align.cpp @@ -6,13 +6,13 @@ extern "C" { /// @brief Test fixture. -class UtApiAlign : public testing::Test +class UtInternalAlign : public testing::Test {}; /// @brief Comparing patomic_align_t prioritizes recommend over all other -/// members. -TEST_F(UtApiAlign, compare_align_recommended_ne) +/// members. Larger recommended is stricter (and compares greater). +TEST_F(UtInternalAlign, compare_align_recommended_ne) { // setup // larger recommended is stricter @@ -30,8 +30,9 @@ TEST_F(UtApiAlign, compare_align_recommended_ne) } /// @brief Comparing patomic_align_t prioritizes minimum over all other members -/// if recommend compares equal. -TEST_F(UtApiAlign, compare_align_minimum_ne_recommended_eq) +/// if recommend compares equal. Larger minimum is stricter (and +/// compares greater). +TEST_F(UtInternalAlign, compare_align_minimum_ne_recommended_eq) { // setup // larger recommended is stricter @@ -49,8 +50,9 @@ TEST_F(UtApiAlign, compare_align_minimum_ne_recommended_eq) } /// @brief Comparing patomic_align_t prioritizes size_within after all other -/// members. -TEST_F(UtApiAlign, compare_align_size_within_any_minimum_eq_recommended_eq) +/// members. Larger size_within is less strict (and compares lesser), +/// except for 0 which is the least strict. +TEST_F(UtInternalAlign, compare_align_size_within_any_minimum_eq_recommended_eq) { // setup // smaller size_within is stricter (except zero which is least strict)