Skip to content

Commit

Permalink
modified tests l_d, l_u, l_x
Browse files Browse the repository at this point in the history
  • Loading branch information
cynthiar committed Jul 15, 2023
1 parent 7d11dcf commit 3ca547b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/StringUnittest/s21_sprintf_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,17 +509,19 @@ END_TEST
START_TEST(l_d) {
char s21_buff[100] = "";
char buff[100] = "";
s21_sprintf(s21_buff, "%ld", 92233720);
sprintf(buff, "%ld", 92233720);
long int d = 9223372036854775807;
s21_sprintf(s21_buff, "%ld", d);
sprintf(buff, "%ld", d);
ck_assert_pstr_eq(s21_buff, buff);
}
END_TEST

START_TEST(l_o) {
char s21_buff[100] = "";
char buff[100] = "";
s21_sprintf(s21_buff, "%lo", 9223372036);
sprintf(buff, "%lo", 9223372036);
long int o = 84518;
s21_sprintf(s21_buff, "%lo", o);
sprintf(buff, "%lo", o);
ck_assert_pstr_eq(s21_buff, buff);
}
END_TEST
Expand All @@ -536,8 +538,9 @@ END_TEST
START_TEST(l_x) {
char s21_buff[100] = "";
char buff[100] = "";
s21_sprintf(s21_buff, "%lx", 92233720);
sprintf(buff, "%lx", 92233720);
long int x = 256;
s21_sprintf(s21_buff, "%lx", x);
sprintf(buff, "%lx", x);
ck_assert_pstr_eq(s21_buff, buff);
}
END_TEST
Expand Down

0 comments on commit 3ca547b

Please sign in to comment.