Files
hakorune/local_tests/test_null_literal_support.nyash
Moe Charm ef7a0de3b0 feat: Prepare for code modularization and cleanup
- Archive old documentation and test files to `docs/archive/` and `local_tests/`.
- Remove various temporary and old files from the project root.
- Add `nekocode-rust` analysis tool and its output files (`nekocode/`, `.nekocode_sessions/`, `analysis.json`).
- Minor updates to `apps/chip8_nyash/chip8_emulator.nyash` and `local_tests` files.

This commit cleans up the repository and sets the stage for further code modularization efforts, particularly in the `src/interpreter` and `src/parser` modules, based on recent analysis.
2025-08-16 01:30:39 +09:00

36 lines
1.1 KiB
Plaintext

// Test null literal support
static box NullLiteralTest {
init { console }
main() {
me.console = new ConsoleBox()
me.console.log("🧪 Testing null literal support")
// Test 1: Basic null assignment
local null_value = null
me.console.log("Null value: " + null_value)
// Test 2: Null comparison
if null_value == null {
me.console.log("✅ Null comparison works")
} else {
me.console.log("❌ Null comparison failed")
}
// Test 3: Null vs non-null
local non_null = "not null"
if non_null != null {
me.console.log("✅ Non-null comparison works")
} else {
me.console.log("❌ Non-null comparison failed")
}
// Test 4: Null in conditions
if null_value == null {
me.console.log("✅ Null condition evaluation works")
}
me.console.log("✅ Null literal tests completed")
return "Null literal support verified"
}
}