More robuust ness.
This commit is contained in:
@@ -47,8 +47,9 @@ int main() {
|
||||
pos = ftell(file);
|
||||
tc.assertEqual(pos, 10, "fseek(SEEK_END, 0) moves to end of file");
|
||||
|
||||
char* read_attempt = fgets(file, 10);
|
||||
int eof = feof(file);
|
||||
tc.assertTrue(eof, "feof() returns true at end of file");
|
||||
tc.assertTrue(eof, "feof() returns true after read attempt at EOF");
|
||||
|
||||
fclose(file);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ int main() {
|
||||
|
||||
printf("\n=== Testing replace ===\n");
|
||||
tc.assertStringEqual(replace("hello world", "world", "there"), "hello there", "replace('hello world', 'world', 'there')");
|
||||
tc.assertStringEqual(replace("aaa", "a", "b"), "baa", "replace('aaa', 'a', 'b') replaces first");
|
||||
tc.assertStringEqual(replace("aaa", "a", "b"), "bbb", "replace('aaa', 'a', 'b') replaces all occurrences");
|
||||
|
||||
printf("\n=== Testing String Concatenation ===\n");
|
||||
char* hello = "Hello";
|
||||
|
||||
Reference in New Issue
Block a user