Skip to content

Commit

Permalink
GHI #32 Change UtApiAlign to UtInternalAlign [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
doodspav committed Jul 14, 2024
1 parent 3c55b2c commit 688bb60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/kind/ut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---- Create Tests ----

create_ut(
NAME UtApiAlign
NAME UtInternalAlign
SOURCE
align.cpp
"${PATOMIC_SOURCE_DIR}/src/api/align.c"
Expand Down
16 changes: 9 additions & 7 deletions test/kind/ut/api/align.cpp → test/kind/ut/internal/align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 688bb60

Please sign in to comment.