Commit 8b02ede
committed
test: Add native calling, extern functions, and Zig execution tests
Expand embed_tests.rs with 21 additional tests covering:
Native Calling Tests:
- i32 add, multiply, subtract operations
- Single parameter functions (square)
- 3 and 4 parameter functions (sum3, sum4)
- Wrong argument count error handling
- Function not found error handling
Zig Code Execution Tests:
- Arithmetic operations with multiple operators
- Conditional if statements (abs function)
- While loops (sum_to function)
- Comparison operators (max function)
- Multiple functions in single module
- Negative number handling
- Constant return (no parameters)
Cross-Module / Extern Function Tests:
- Export and list symbols
- Explicit export_function API
- Export nonexistent function error
- Check export conflict detection
- Cross-module extern function calls
- Multiple modules with multiple exports
Total: 94 tests now passing for zyntax_embed1 parent 9b9ab93 commit 8b02ede
1 file changed
Lines changed: 748 additions & 0 deletions
0 commit comments