Commit 910ec7d
* feat: Add property tests for evaluation safety and determinism
Adds two new describe blocks to test/support/lisp_generators_test.exs:
1. "evaluation safety" - Property test that verifies generated PTC-Lisp
expressions evaluate without crashing the interpreter. Handles both
successful evaluation and expected runtime errors gracefully.
2. "determinism" - Property test that verifies the same input always
produces the same output across multiple runs with identical context
and tools.
Both properties dynamically extract tool names from generated source code
and provide matching mock tool implementations to ensure evaluation can
complete.
Fixes #133
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Extract duplicated tool setup and evaluation patterns in lisp_generators_test.exs
- Extract tool extraction logic into `build_tools_for_source/2` helper
(previously duplicated in evaluation safety and determinism tests)
- Extract try/rescue pattern into `safe_run/2` helper
(previously duplicated 3 times across both tests)
Resolves PR review issues from #134.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 85f5e3a commit 910ec7d
1 file changed
+48
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
264 | 297 | | |
265 | 298 | | |
266 | 299 | | |
| |||
320 | 353 | | |
321 | 354 | | |
322 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
323 | 371 | | |
0 commit comments