Skip to content

Commit

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

START_TEST(l_x) {
char s21_buff[100] = "";
char buff[100] = "";
long int x = 256;
long int x = 15;
s21_sprintf(s21_buff, "%lx", x);
sprintf(buff, "%lx", x);
ck_assert_pstr_eq(s21_buff, buff);
Expand Down

0 comments on commit c3a3b26

Please sign in to comment.