Files
hakorune/local_tests/test_socketbox_fix_validation.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

38 lines
1.4 KiB
Plaintext

# test_socketbox_fix_validation.nyash
# ✅ Validation test for SocketBox deadlock fix
static box Main {
init { console }
main() {
me.console = new ConsoleBox()
me.console.log("🎯 SocketBox Deadlock Fix Validation")
local socket = new SocketBox()
me.console.log("✅ SocketBox created successfully")
# Test 1: Basic method calls that were deadlocking
me.console.log("Test 1: toString() method...")
local str = socket.toString()
me.console.log("✅ toString() success: " + str)
me.console.log("Test 2: isServer() before bind...")
local isServerBefore = socket.isServer()
me.console.log("✅ isServer() before: " + isServerBefore.toString())
me.console.log("Test 3: bind() method...")
local bindResult = socket.bind("127.0.0.1", 18888)
me.console.log("✅ bind() success: " + bindResult.toString())
me.console.log("Test 4: isServer() after bind...")
local isServerAfter = socket.isServer()
me.console.log("✅ isServer() after: " + isServerAfter.toString())
me.console.log("Test 5: close() method...")
local closeResult = socket.close()
me.console.log("✅ close() success: " + closeResult.toString())
me.console.log("🎉 All SocketBox methods working without deadlock!")
return "SOCKETBOX_FIX_VALIDATED"
}
}