Remove useless void checks
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
#include "assert/assert.h"
|
||||
|
||||
static void test_assertTrueImpl(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should not assert when true false statement
|
||||
assertTrueImpl(__FILE__, __LINE__, true, "This should not assert");
|
||||
|
||||
@@ -19,8 +17,6 @@ static void test_assertTrueImpl(void **state) {
|
||||
}
|
||||
|
||||
static void test_assertFalseImpl(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should not assert when passing false statement
|
||||
assertFalseImpl(__FILE__, __LINE__, false, "This should not assert");
|
||||
|
||||
@@ -30,15 +26,11 @@ static void test_assertFalseImpl(void **state) {
|
||||
|
||||
|
||||
static void test_assertUnreachableImpl(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should always assert false
|
||||
expect_assert_failure(assertUnreachableImpl(__FILE__, __LINE__, "asserts"));
|
||||
}
|
||||
|
||||
static void test_assertNotNullImpl(void **state) {
|
||||
(void)state;
|
||||
|
||||
int someValue = 42;
|
||||
|
||||
// Should not assert with a valid pointer
|
||||
@@ -49,15 +41,11 @@ static void test_assertNotNullImpl(void **state) {
|
||||
}
|
||||
|
||||
static void test_assertDeprecatedImpl(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Always asserts when called
|
||||
expect_assert_failure(assertDeprecatedImpl(__FILE__, __LINE__, "deprecated"));
|
||||
}
|
||||
|
||||
static void test_assertTrue(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should not assert when passing true statement
|
||||
assertTrue(true, "This should not assert");
|
||||
|
||||
@@ -66,8 +54,6 @@ static void test_assertTrue(void **state) {
|
||||
}
|
||||
|
||||
static void test_assertFalse(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should not assert when passing true statement
|
||||
assertFalse(false, "This should not assert");
|
||||
|
||||
@@ -76,15 +62,11 @@ static void test_assertFalse(void **state) {
|
||||
}
|
||||
|
||||
static void test_assertUnreachable(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should always assert false
|
||||
expect_assert_failure(assertUnreachable("asserts"));
|
||||
}
|
||||
|
||||
static void test_assertNotNull(void **state) {
|
||||
(void)state;
|
||||
|
||||
int someValue = 42;
|
||||
|
||||
// Should not assert with a valid pointer
|
||||
@@ -95,8 +77,6 @@ static void test_assertNotNull(void **state) {
|
||||
}
|
||||
|
||||
static void test_assertNull(void **state) {
|
||||
(void)state;
|
||||
|
||||
int someValue = 42;
|
||||
|
||||
// Should assert with a valid pointer
|
||||
@@ -107,15 +87,11 @@ static void test_assertNull(void **state) {
|
||||
}
|
||||
|
||||
static void test_assertDeprecated(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Always asserts when called
|
||||
expect_assert_failure(assertDeprecated("deprecated"));
|
||||
}
|
||||
|
||||
static void test_assertStrLenMax(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should not assert when string length is within limit
|
||||
assertStrLenMax("test", 10, "This should not assert");
|
||||
|
||||
@@ -124,8 +100,6 @@ static void test_assertStrLenMax(void **state) {
|
||||
}
|
||||
|
||||
static void test_assertStrLenMin(void **state) {
|
||||
(void)state;
|
||||
|
||||
// Should not assert when string length meets minimum
|
||||
assertStrLenMin("sufficient", 5, "This should not assert");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user