Files
hakorune/apps/tests
nyash-codex 80be814fa4 test: Phase 114 if-only return+post parity (VM + LLVM EXE)
Phase 114 validates that if-only lowering correctly handles cases with:
- Early return in the if-only branch
- Post-if statements that execute on the else path
- Different return values from each path

Fixture: apps/tests/phase114_if_only_return_then_post_min.hako
- Expected output: 7\n2
- f(1): condition true → early return 7
- f(0): condition false → x=1+1=2, return 2

Testing:
- VM backend: phase114_if_only_return_then_post_vm.sh 
- LLVM EXE backend: phase114_if_only_return_then_post_llvm_exe.sh 
- Regression: Phase 103/113 maintained 

Implementation: No new code required - validates existing if-only
exit line routing and post-if statement processing.

Documentation:
- docs/development/current/main/phases/phase-114/README.md
- Updated: 10-Now.md, 01-JoinIR-Selfhost-INDEX.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 02:18:57 +09:00
..

Nyash Test Programs

このディレクトリには、CI/CDやデバッグ用のテストプログラムが含まれています。 実用的なアプリケーションは親ディレクトリ(apps/)にあります。

テストプログラム一覧

LLVMバックエンドテスト

  • ny-llvm-smoke/ - ArrayBox基本操作テスト
  • ny-array-llvm-ret/ - ArrayBox戻り値テスト
  • ny-echo-lite/ - 最小echo実装I/Oテスト
  • ny-map-llvm-smoke/ - MapBoxプラグインテスト
  • ny-vinvoke-smoke/ - 可変長引数5引数テスト
  • ny-vinvoke-llvm-ret/ - 可変長引数戻り値テスト
  • ny-vinvoke-llvm-ret-size/ - 固定長引数size())テスト

実行方法

これらのテストは主に tools/llvm_smoke.sh から実行されます:

# 環境変数でテストを有効化
NYASH_LLVM_MAP_SMOKE=1 ./tools/llvm_smoke.sh
NYASH_LLVM_VINVOKE_RET_SMOKE=1 ./tools/llvm_smoke.sh

注意事項

  • これらは最小限の機能テストであり、実用的なアプリケーションではありません
  • CIでの自動テストを前提に設計されています
  • エラー時の切り分けが容易になるよう、各テストは単一の機能に焦点を当てています