Remove useless void checks
This commit is contained in:
+9
-14
@@ -10,7 +10,6 @@
|
||||
#include "util/memory.h"
|
||||
|
||||
static void test_stringIsWhitespace(void **state) {
|
||||
(void)state;
|
||||
assert_true(stringIsWhitespace(' ')); // Space is whitespace
|
||||
assert_true(stringIsWhitespace('\t')); // Tab is whitespace
|
||||
assert_true(stringIsWhitespace('\n')); // Newline is whitespace
|
||||
@@ -27,7 +26,6 @@ static void test_stringIsWhitespace(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringCopy(void **state) {
|
||||
(void)state;
|
||||
char dest[16];
|
||||
stringCopy(dest, "hello", sizeof(dest));
|
||||
assert_string_equal(dest, "hello"); // Normal copy
|
||||
@@ -57,7 +55,7 @@ static void test_stringCopy(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringCompare(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
// Check for equality
|
||||
assert_int_equal(stringCompare("abc", "abc"), 0);
|
||||
@@ -82,7 +80,7 @@ static void test_stringCompare(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringCompareInsensitive(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
assert_int_equal(stringCompareInsensitive("abc", "ABC"), 0);
|
||||
assert_true(stringCompareInsensitive("abc", "abd") < 0);
|
||||
@@ -100,7 +98,7 @@ static void test_stringCompareInsensitive(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringTrim(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
char buf[32];
|
||||
stringCopy(buf, " hello ", sizeof(buf));
|
||||
@@ -146,7 +144,7 @@ static void test_stringTrim(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringFindLastChar(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
const char *str = "hello world";
|
||||
char *result = stringFindLastChar(str, 'o');
|
||||
@@ -170,7 +168,7 @@ static void test_stringFindLastChar(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringFormat(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
// Test a string format
|
||||
char buffer[32];
|
||||
@@ -229,7 +227,6 @@ static void test_stringFormat(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringToI32(void **state) {
|
||||
(void)state;
|
||||
|
||||
char_t buffer[64];
|
||||
int32_t value;
|
||||
@@ -358,7 +355,6 @@ static void test_stringToI32(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringToI64(void **state) {
|
||||
(void)state;
|
||||
|
||||
char_t buffer[64];
|
||||
int64_t value;
|
||||
@@ -487,7 +483,7 @@ static void test_stringToI64(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringToI16(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
char_t buffer[64];
|
||||
int16_t value;
|
||||
@@ -608,7 +604,7 @@ static void test_stringToI16(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringToU16(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
char_t buffer[64];
|
||||
uint16_t value;
|
||||
@@ -725,7 +721,7 @@ static void test_stringToU16(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringToF32(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
char_t buffer[64];
|
||||
float value;
|
||||
@@ -859,7 +855,7 @@ static void test_stringToF32(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringEndsWith(void **state) {
|
||||
(void)state;
|
||||
|
||||
|
||||
assert_true(stringEndsWith("hello.c", ".c"));
|
||||
assert_true(stringEndsWith("Hello World!", "World!"));
|
||||
@@ -877,7 +873,6 @@ static void test_stringEndsWith(void **state) {
|
||||
}
|
||||
|
||||
static void test_stringEndsWithCaseInsensitive(void **state) {
|
||||
(void)state;
|
||||
|
||||
assert_true(stringEndsWithCaseInsensitive("hello.C", ".c"));
|
||||
assert_true(stringEndsWithCaseInsensitive("Hello World!", "world!"));
|
||||
|
||||
Reference in New Issue
Block a user