Skip to content

Update deps + parameterized test support#397

Draft
mattdurak wants to merge 4 commits intomasterfrom
parameterized_tests
Draft

Update deps + parameterized test support#397
mattdurak wants to merge 4 commits intomasterfrom
parameterized_tests

Conversation

@mattdurak
Copy link
Contributor

Changes

  • Update deps/c-testrunnerswitcher to master (adds PARAMETERIZED_TEST_FUNCTION support)
  • Update deps/ctest to master (adds CTEST_PARAMETERIZED_TEST_FUNCTION)
  • Refactor lock_free_set_ut: replace 6 insert-order tests with 1 PARAMETERIZED_TEST_FUNCTION (lock_free_set_insert_3_items_in_order) with 6 CASE entries
  • Refactor lock_free_set_ut: replace 5 removal-order tests with 1 PARAMETERIZED_TEST_FUNCTION (lock_free_set_removes_all_3_items) with 5 CASE entries

Net reduction: 11 individual TEST_FUNCTION definitions replaced by 2 PARAMETERIZED_TEST_FUNCTION definitions (~230 lines saved)

All 10 unit tests pass.

- Update deps/c-testrunnerswitcher to master (adds PARAMETERIZED_TEST_FUNCTION support)
- Update deps/ctest to master
- Refactor lock_free_set_ut: replace 6 insert-order tests with PARAMETERIZED_TEST_FUNCTION (lock_free_set_insert_3_items_in_order)
- Refactor lock_free_set_ut: replace 5 removal-order tests with PARAMETERIZED_TEST_FUNCTION (lock_free_set_removes_all_3_items)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mattdurak and others added 2 commits March 10, 2026 14:17
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattdurak
Copy link
Contributor Author

Parameterized Test Review — clds PR #397

✅ clds_hash_table_ut.c — PASS

Deleted TEST_FUNCTION CASE Args Match
..._fails_with_ERROR_... CASE((...SET_VALUE_ERROR, ...SET_VALUE_ERROR, NULL, NULL), ERROR)
..._fails_with_NOT_FOUND_... CASE((...SET_VALUE_NOT_FOUND, ...SET_VALUE_ERROR, NULL, NULL), NOT_FOUND)
..._fails_with_CONDITION_NOT_MET_... CASE((...CONDITION_NOT_MET, ...CONDITION_NOT_MET, test_item_condition_check, (void*)0x42), CONDITION_NOT_MET)
  • SRS 01_100 + 04_002 correctly deduplicated above PARAMETERIZED_TEST_FUNCTION
  • Helper test_when_clds_sorted_list_set_value_fails_... properly inlined into parameterized body

✅ lock_free_set_ut.c — insert tests — PASS

6 deleted TEST_FUNCTIONs → 6 CASEs with correct (first, second, third) index mappings:

Deleted TEST_FUNCTION CASE values Label
insert_3rd_item_left_left (2, 1, 0) left_left
insert_3rd_item_right_right (0, 1, 2) right_right
insert_3rd_item_left_right (2, 0, 1) left_right
insert_3rd_item_right_left (0, 2, 1) right_left
insert_3_items_...left_first (1, 0, 2) filling_left_first
insert_3_items_...right_first (1, 2, 0) filling_right_first
  • SRS 01_009 + 01_010 deduplicated (block comments + inline ref)

✅ lock_free_set_ut.c — remove tests — PASS

5 deleted TEST_FUNCTIONs → 5 CASEs with correct (remove_first, remove_second, remove_third) mappings:

Deleted TEST_FUNCTION CASE values Label
remove_0_1_2 (0, 1, 2) remove_0_1_2
remove_0_2_1 (0, 2, 1) remove_0_2_1
remove_1_0_2 (1, 0, 2) remove_1_0_2
remove_2_0_1 (2, 0, 1) remove_2_0_1
remove_2_1_0 (2, 1, 0) remove_2_1_0
  • SRS 01_015 + 01_016 deduplicated (block comments + inline ref)
  • Note: permutation (1,2,0) was absent in the original and remains absent — not a regression

⚠️ clds_reals_ut.c — // no-srs REMOVED

check_all_clds_reals had // no-srs intentionally (no SRS requirements for a reals-mapping test). This PR removes it without converting the test to parameterized form. Was this intentional? If the CI SRS checker relies on // no-srs to suppress warnings, removing it may cause failures.


Automated review by Copilot CLI

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattdurak
Copy link
Contributor Author

Fixed: restored // no-srs on non-parameterized test check_all_clds_reals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant