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

34 lines
1.2 KiB
Plaintext

# Diagnostic test to understand clone state sharing
static box Main {
init { console, socket1, socket2 }
main() {
me.console = new ConsoleBox()
me.console.log("🔬 Clone State Diagnostic Test")
# Create original SocketBox
me.socket1 = new SocketBox()
# Set state via bind
local bindResult = me.socket1.bind("127.0.0.1", 19001)
me.console.log("✅ bind() result: " + bindResult.toString())
# Check state immediately
local isServer1 = me.socket1.isServer()
me.console.log("🔍 socket1.isServer() after bind: " + isServer1.toString())
# Now check toString to see the socket ID
local socketStr1 = me.socket1.toString()
me.console.log("🆔 socket1 ID after bind: " + socketStr1)
# Check state again to see if we get the same socket ID
local isServer2 = me.socket1.isServer()
me.console.log("🔍 socket1.isServer() second call: " + isServer2.toString())
# Check toString again
local socketStr2 = me.socket1.toString()
me.console.log("🆔 socket1 ID second call: " + socketStr2)
return "DIAGNOSTIC_COMPLETE"
}
}