Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use float literals for TEST_FLTEQ #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/utils/yargs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void test_yargs_init() {
TEST_STREQ("new_value", some_name);
TEST_INTEQ(32, no_short_name);
TEST_CHECK(some_other_name);
TEST_FLTEQ(-99.9, float_arg, 0.0001f);
TEST_FLTEQ(-99.9f, float_arg, 0.0001f);
TEST_INTEQ(2, yargs_get_unnamed_length());
TEST_STREQ("unnamed1", yargs_get_unnamed(0));
TEST_STREQ("unnamed2", yargs_get_unnamed(1));
Expand Down Expand Up @@ -255,7 +255,7 @@ void test_yargs_init() {
TEST_STREQ("new_value", some_name);
TEST_INTEQ(10, no_short_name);
TEST_CHECK(some_other_name);
TEST_FLTEQ(-99.9, float_arg, 0.0001f);
TEST_FLTEQ(-99.9f, float_arg, 0.0001f);
TEST_INTEQ(2, yargs_get_unnamed_length());
TEST_STREQ("unnamed1", yargs_get_unnamed(0));
TEST_STREQ("unnamed2", yargs_get_unnamed(1));
Expand Down Expand Up @@ -349,7 +349,7 @@ void test_LoadFileFromContents() {
TEST_STREQ("new_value", some_name);
TEST_INTEQ(32, no_short_name);
TEST_CHECK(some_other_name);
TEST_FLTEQ(-99.9, float_arg, 0.0001f);
TEST_FLTEQ(-99.9f, float_arg, 0.0001f);
TEST_INTEQ(0, yargs_get_unnamed_length());
yargs_free();

Expand Down Expand Up @@ -379,7 +379,7 @@ void test_LoadFileFromContents() {
TEST_STREQ("new_value", some_name);
TEST_INTEQ(10, no_short_name);
TEST_CHECK(some_other_name);
TEST_FLTEQ(-99.9, float_arg, 0.0001f);
TEST_FLTEQ(-99.9f, float_arg, 0.0001f);
TEST_INTEQ(2, yargs_get_unnamed_length());
TEST_STREQ("unnamed1", yargs_get_unnamed(0));
TEST_STREQ("unnamed2", yargs_get_unnamed(1));
Expand Down Expand Up @@ -463,7 +463,7 @@ void test_yargs_load_from_file() {
TEST_STREQ("new_value", some_name);
TEST_INTEQ(32, no_short_name);
TEST_CHECK(some_other_name);
TEST_FLTEQ(-99.9, float_arg, 0.0001f);
TEST_FLTEQ(-99.9f, float_arg, 0.0001f);
TEST_INTEQ(0, yargs_get_unnamed_length());
yargs_free();
}
Expand Down Expand Up @@ -503,7 +503,7 @@ void test_yargs_save_to_file() {
TEST_STREQ("new_value", some_name);
TEST_INTEQ(32, no_short_name);
TEST_CHECK(some_other_name);
TEST_FLTEQ(-99.9, float_arg, 0.0001f);
TEST_FLTEQ(-99.9f, float_arg, 0.0001f);
TEST_INTEQ(2, yargs_get_unnamed_length());
TEST_STREQ("unnamed1", yargs_get_unnamed(0));
TEST_STREQ("unnamed2", yargs_get_unnamed(1));
Expand Down