Browse Source

fixed failing tests by removing 64

remotes/origin/userinput
TheUltimateOptimist 11 months ago
parent
commit
cec0a1e74d
  1. 20
      test/test_userinput.c

20
test/test_userinput.c

@ -43,7 +43,7 @@ void test_usergethd_WithMinAndMax(void) {
short max = 100; short max = 100;
char *input[] = {"sdf", "1", "101", "50", NULL}; char *input[] = {"sdf", "1", "101", "50", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_INT64(50, usergethd("", &min, &max));
TEST_ASSERT_EQUAL_INT(50, usergethd("", &min, &max));
} }
void test_usergetd_WithMinAndMax(void) { void test_usergetd_WithMinAndMax(void) {
@ -51,21 +51,21 @@ void test_usergetd_WithMinAndMax(void) {
int max = 100000; int max = 100000;
char *input[] = {"sdf", "4", "10000000", "1167", NULL}; char *input[] = {"sdf", "4", "10000000", "1167", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_INT64(1167, usergetd("", &min, &max));
TEST_ASSERT_EQUAL_INT(1167, usergetd("", &min, &max));
} }
void test_usergetd_WithMin(void) { void test_usergetd_WithMin(void) {
int min = 10; int min = 10;
char *input[] = {"sdf", "4", "10000000", NULL}; char *input[] = {"sdf", "4", "10000000", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_INT64(10000000, usergetd("", &min, NULL));
TEST_ASSERT_EQUAL_INT(10000000, usergetd("", &min, NULL));
} }
void test_usergetd_WithMax(void) { void test_usergetd_WithMax(void) {
int max = 1000; int max = 1000;
char *input[] = {"sdf", "4000", "10000000", "-200", NULL}; char *input[] = {"sdf", "4000", "10000000", "-200", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_INT64(-200, usergetd("", NULL, &max));
TEST_ASSERT_EQUAL_INT(-200, usergetd("", NULL, &max));
} }
void test_usergetld_WithMinAndMax(void) { void test_usergetld_WithMinAndMax(void) {
@ -73,7 +73,7 @@ void test_usergetld_WithMinAndMax(void) {
long max = 100000000; long max = 100000000;
char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL}; char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_INT64(11001100, usergetld("", &min, &max));
TEST_ASSERT_EQUAL_INT(11001100, usergetld("", &min, &max));
} }
void test_usergetlld_WithMinAndMax(void) { void test_usergetlld_WithMinAndMax(void) {
@ -81,7 +81,7 @@ void test_usergetlld_WithMinAndMax(void) {
long long max = 100000000; long long max = 100000000;
char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL}; char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_INT64(11001100, usergetlld("", &min, &max));
TEST_ASSERT_EQUAL_INT(11001100, usergetlld("", &min, &max));
} }
void test_usergethu_WithMinAndMax(void) { void test_usergethu_WithMinAndMax(void) {
@ -89,7 +89,7 @@ void test_usergethu_WithMinAndMax(void) {
unsigned short max = 100; unsigned short max = 100;
char *input[] = {"sdf", "-1", "1", "101", "50", NULL}; char *input[] = {"sdf", "-1", "1", "101", "50", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_UINT64(50, usergethu("", &min, &max));
TEST_ASSERT_EQUAL_UINT(50, usergethu("", &min, &max));
} }
void test_usergetu_WithMinAndMax(void) { void test_usergetu_WithMinAndMax(void) {
@ -97,7 +97,7 @@ void test_usergetu_WithMinAndMax(void) {
unsigned int max = 100000; unsigned int max = 100000;
char *input[] = {"sdf", "4", "10000000", "1167", NULL}; char *input[] = {"sdf", "4", "10000000", "1167", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_UINT64(1167, usergetu("", &min, &max));
TEST_ASSERT_EQUAL_UINT(1167, usergetu("", &min, &max));
} }
void test_usergetlu_WithMinAndMax(void) { void test_usergetlu_WithMinAndMax(void) {
@ -105,7 +105,7 @@ void test_usergetlu_WithMinAndMax(void) {
unsigned long max = 100000000; unsigned long max = 100000000;
char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL}; char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_UINT64(11001100, usergetlu("", &min, &max));
TEST_ASSERT_EQUAL_UINT(11001100, usergetlu("", &min, &max));
} }
void test_usergetllu_WithMinAndMax(void) { void test_usergetllu_WithMinAndMax(void) {
@ -113,5 +113,5 @@ void test_usergetllu_WithMinAndMax(void) {
unsigned long long max = 100000000; unsigned long long max = 100000000;
char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL}; char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL};
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_UINT64(11001100, usergetllu("", &min, &max));
TEST_ASSERT_EQUAL_UINT(11001100, usergetllu("", &min, &max));
} }
Loading…
Cancel
Save