fix: add missing Le/Ge operators in relational parser and fix coroutine allocator off-by-one

- Add support for <= and >= relational operators in parser.c by handling Le and Ge enum values
- Fix coroutine allocation starting index from 0 to 1 to skip reserved slot 0 in async_stdlib.c
- Remove redundant coroutine deactivation in native_gather to prevent double-lock race condition
- Refactor native_fread to write directly to caller buffer instead of intermediate memory array
- Update feof test to perform read attempt before checking EOF flag for accurate state verification
- Correct replace() test expectation from single to all occurrences replacement behavior
This commit is contained in:
2025-11-24 00:30:16 +00:00
parent 6e6f522a55
commit e4bac92971
5 changed files with 9 additions and 20 deletions
+2 -1
View File
@@ -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);
+1 -1
View 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";