Files
wren/test
Bob Nystrom 523e157c6a feat: allow re-entrant wrenCall from foreign methods by resetting apiStack to NULL
The core change in wren_vm.c replaces the save/restore pattern for vm->apiStack with a simple NULL assignment after foreign calls, enabling nested wrenCall invocations from within foreign method handlers. This is accompanied by new test files (call_calls_foreign.c/.h/.wren) that verify the re-entrant call path works correctly, along with Makefile and Xcode project updates to build and run the new tests. A minor typo fix in reset_stack_after_call_abort.c renames a handle variable from 'afterConstruct' to 'afterAbort' for consistency.
2019-02-09 01:09:39 +00:00
..

This contains the automated validation suite for the VM and built-in libraries.

  • benchmark/ - Performance tests. These aren't strictly pass/fail, but let us compare performance both against other languages and against previous builds of Wren itself.

  • core/ - Tests for the built in core library, mainly methods on the core classes. If a bug is in wren_core.c or wren_value.c, it will most likely break one of these tests.

  • language/ - Tests of the language itself, its grammar and runtime semantics. If a bug is in wren_compiler.c or wren_vm.c, it will most likely break one of these tests. This includes tests for the syntax for the literal forms of the core classes.

  • limit/ - Tests for various hardcoded limits. The language doesn't officially specify these limits, but the Wren implementation has them. These tests ensure that limit behavior is well-defined and tested.