aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-08 01:10:31 -0800
committerChristian C <cc@localhost>2025-03-08 01:10:31 -0800
commit2be81e95ed81e4f76ad0b4c687c9f2696107b959 (patch)
treec88915b4e44e495ef391f44e1dbcb594d087b39e
parentcc6e13dcde0c556114310b8e367118206db777f4 (diff)
Fix result reporting
-rw-r--r--test/lib/color.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/lib/color.c b/test/lib/color.c
index 7b2a238..69ce97b 100644
--- a/test/lib/color.c
+++ b/test/lib/color.c
@@ -22,55 +22,55 @@ void _TEST_color_zero(bool_t* result, uint16_t* test_count, uint16_t* test_pass)
// Should result: True
sub_result = test_color_zero(test_rgba, 1, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 2: 1 channel non-zero color
// Should result: False
sub_result = test_color_zero(test_Rgba, 1, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 3: 2 channel zero color
// Should result: True
sub_result = test_color_zero(test_rgba, 2, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 4: 2 channel non-zero color
// Should result: False
sub_result = test_color_zero(test_rGba, 2, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 5: 3 channel zero color
// Should result: True
sub_result = test_color_zero(test_rgba, 3, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 6: 3 channel non-zero color
// Should result: False
sub_result = test_color_zero(test_rgBa, 3, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 7: 4 channel zero color
// Should result: True
sub_result = test_color_zero(test_rgba, 4, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 8: 4 channel non-zero color
// Should result: False
sub_result = test_color_zero(test_rgBa, 4, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
// Test 9: 4 channel non-zero color (Alpha non-zero)
// Should result: True
sub_result = test_color_zero(test_rgbA, 4, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_ZERO",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_ZERO",sub_result, *test_count, (*test_pass));
}
bool_t test_color_equal(const uint8_t* color1, const uint8_t* color2, size_t channels, bool_t result)
@@ -89,73 +89,73 @@ void _TEST_color_equal(bool_t* result, uint16_t* test_count, uint16_t* test_pass
// Should result: True
sub_result = test_color_equal(test_rgba, test_rgba, 1, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 2: 1 channel equal (nonzero)
// Should result: True
sub_result = test_color_equal(test_Rgba, test_Rgba, 1, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 3: 1 channel nonequal
// Should result: True
sub_result = test_color_equal(test_rgba, test_Rgba, 1, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 4: 2 channel equal (zero)
// Should result: True
sub_result = test_color_equal(test_rgba, test_rgba, 2, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 5: 2 channel equal (nonzero)
// Should result: True
sub_result = test_color_equal(test_rGba, test_rGba, 2, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 6: 2 channel nonequal
// Should result: False
sub_result = test_color_equal(test_Rgba, test_rGba, 2, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 7: 3 channel equal (zero)
// Should result: True
sub_result = test_color_equal(test_rgba, test_rgba, 3, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 8: 3 channel equal (nonzero)
// Should result: True
sub_result = test_color_equal(test_rgBa, test_rgBa, 3, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 9: 3 channel nonequal
// Should result: False
sub_result = test_color_equal(test_Rgba, test_rgBa, 3, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 7: 4 channel equal (zero)
// Should result: True
sub_result = test_color_equal(test_rgba, test_rgba, 4, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 8: 4 channel equal (nonzero)
// Should result: True
sub_result = test_color_equal(test_rgbA, test_rgbA, 4, TRUE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
// Test 9: 4 channel nonequal
// Should result: False
sub_result = test_color_equal(test_Rgba, test_rgbA, 4, FALSE);
*result &= sub_result;
- TEST_RESULT("COLOR_EQUAL",*result, *test_count, (*test_pass));
+ TEST_RESULT("COLOR_EQUAL",sub_result, *test_count, (*test_pass));
}
// Meta test function