Improve testing infrastructure with dynamic discovery and validation #20

Merged
mvhutz merged 4 commits from style/lambda-iterator into main 2026-01-13 01:20:47 +00:00

4 Commits

Author SHA1 Message Date
5ccc41b104 feat: add test target to Makefile.
Added make test directive that runs tests without benchmarks.
Updated help text to include the new test target.
2026-01-12 20:13:14 -05:00
e17a85e0a3 refactor: use assert throughout tests and require expected files.
Renamed benchmark_test.go to lambda_test.go.
Consolidated helper functions to use single runSample function.
Replaced all error handling with assert for consistency.
Removed optional expected file check to require all test files have corresponding expected files.
2026-01-12 20:09:21 -05:00
4a5c424e54 test: add dynamic test discovery and validity checks.
Modified benchmark_test.go to dynamically discover all .test files in the
tests directory instead of using hardcoded paths.
Added TestSamplesValidity integration test that validates each test file
against its corresponding .expected file.
Added runSampleWithOutput helper function to capture interpreter output.
Added new test cases with expected outputs for validation.
2026-01-12 20:04:00 -05:00
588f4cd521 feat: added swap to iterator 2026-01-12 19:39:48 -05:00