Commit Graph

3 Commits

Author SHA1 Message Date
saqut 636bfcc6d5 fix(ir): %= bileşik atama IR üretiminde eksikti (B8)
Teşhis (a): Sadece %=  unutulmuş — +=, -=, *=, /= doğru çalışıyordu.
PERCENT_EQUAL MOD opcode'una yönlendirildi; sıfıra mod runtime hatası
zaten interpreter'da mevcut, yeni kod gerekmedi.

CMakeLists.txt'e .runtime_error uzantısı eklendi (çalışma zamanı
hatası golden testleri için; aynı run_golden_error.cmake altyapısı).

Testler: compound_mod (17%5=2 zinciri) + mod_by_zero (runtime hata).
21/21 geçti.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 23:03:54 +03:00
abdussamedulutas ac96ad810c test: golden testler — operatör önceliği, döngüler, folding, DCE
closes #99, #100, #104, #105

- arithmetic/precedence: Pratt öncelik + sol-birliktelik + modulo
- loops/basic: while/do-while/for üçü de 0,1,2 üretiyor
- loops/do_while_once: koşul baştan yanlış, gövde yine de bir kez çalışıyor
- opt/folding: sabit katlama çıktısı (14,3,1,0,1,0,0)
- opt/dce: ölü return sonrası kod programı etkilemiyor (10,0,0)
9/9 ctest geçti
2026-06-18 22:33:19 +03:00
abdussamedulutas 85d955ec62 test: golden-test koşucusu + Value audit + saqut ir pipeline fix
closes #113, #114, #75

- cmake/run_golden.cmake: BINARY/SOURCE/EXPECTED ile çalışan karşılaştırma betiği
- CMakeLists.txt: enable_testing(), golden test otomatik keşif (CONFIGURE_DEPENDS),
  unit_tests (tests/run.sh) ctest entegrasyonu
- tests/golden/: fibonacci, string, arithmetic — 4/4 yeşil (negatif doğrulama da geçti)
- value.hpp: stale yorum temizlendi, toString() eklendi, switch exhaustive hale getirildi
- ir.hpp: TypeChecker + StructuralValidator eklendi — run pipeline ile artık eşit
2026-06-18 22:31:26 +03:00