Skip to content

Commit

Permalink
test: add comprehensive VM opcode tests (#750)
Browse files Browse the repository at this point in the history
Add extensive test coverage for VM opcodes including:

- Basic operations (OpLoadEnv, OpTrue, OpFalse, OpNil)
- Arithmetic operations (OpNegate, OpExponent)
- String operations (OpEqualString, OpMatches)
- Collection operations (OpIn, OpLen)
- Type operations (OpCast)
- Control flow (OpThrow)
- Function calls (OpCall0-3, OpCallN)
- Index and count manipulation (OpGetIndex, OpSetIndex)
- Profiling operations (OpProfileStart, OpProfileEnd)

Also add high-level expression tests for:
- Arithmetic expressions
- String operations
- Data structure operations
- Group and sort operations

Each test case includes detailed comments and covers both success and error cases.

These tests combined with a debugger helped me navigate the VM internals
significantly.

Signed-off-by: Ville Vesilehto <[email protected]>
  • Loading branch information
thevilledev authored Jan 27, 2025
1 parent 192ab82 commit 6ef04ec
Showing 1 changed file with 932 additions and 0 deletions.
Loading

0 comments on commit 6ef04ec

Please sign in to comment.