tests: fix conformance to C90
This commit is contained in:
parent
7964b7f917
commit
8d0263a088
@ -203,12 +203,14 @@ const char* test_internal__string_parse()
|
||||
|
||||
const char* test_internal__string_utils()
|
||||
{
|
||||
char c; /* for loop counter */
|
||||
|
||||
UTEST_ASSERT(gmio_clocale_isspace(' '));
|
||||
UTEST_ASSERT(gmio_clocale_isspace('\t'));
|
||||
UTEST_ASSERT(gmio_clocale_isspace('\n'));
|
||||
UTEST_ASSERT(gmio_clocale_isspace('\r'));
|
||||
|
||||
for (char c = 0; c >= 0 && c <= 127; ++c) {
|
||||
for (c = 0; c >= 0 && c <= 127; ++c) {
|
||||
if (65 <= c && c <= 90) {
|
||||
UTEST_ASSERT(gmio_clocale_isupper(c));
|
||||
}
|
||||
|
@ -25,6 +25,9 @@
|
||||
static void add_triangle(
|
||||
void* cookie, uint32_t tri_id, const gmio_stl_triangle_t* triangle)
|
||||
{
|
||||
GMIO_UNUSED(cookie);
|
||||
GMIO_UNUSED(tri_id);
|
||||
GMIO_UNUSED(triangle);
|
||||
}
|
||||
|
||||
struct filepath_errorcode
|
||||
@ -49,11 +52,12 @@ const char* test_stl_read()
|
||||
};
|
||||
const size_t expected_count =
|
||||
sizeof(expected) / sizeof(filepath_errorcode_t);
|
||||
size_t i; /* for loop counter */
|
||||
gmio_stl_mesh_creator_t meshc = {0};
|
||||
|
||||
meshc.add_triangle_func = &add_triangle;
|
||||
|
||||
for (size_t i = 0; i < expected_count; ++i) {
|
||||
for (i = 0; i < expected_count; ++i) {
|
||||
const int err = gmio_stl_read_file(expected[i].filepath, &meshc, NULL);
|
||||
if (err != expected[i].errorcode) {
|
||||
printf("\nfilepath : %s\n"
|
||||
|
Loading…
Reference in New Issue
Block a user