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

63 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🔍 他のBox動作確認 - SocketBoxとの比較分析
# 正常に動作するBoxの状態保持を検証
static box Main {
init { console, result }
main() {
me.console = new ConsoleBox()
me.console.log("🔍 他のBox動作確認テスト開始")
# ===== MapBox状態テスト =====
me.console.log("=== MapBox状態テスト ===")
local testMap = new MapBox()
me.console.log("MapBox作成: " + testMap.toString())
testMap.set("key1", "value1")
local getValue = testMap.get("key1")
me.console.log("MapBox set/get: " + getValue.toString())
# ===== ArrayBox状態テスト =====
me.console.log("=== ArrayBox状態テスト ===")
local testArray = new ArrayBox()
me.console.log("ArrayBox作成: " + testArray.toString())
testArray.push("item1")
local arraySize = testArray.size()
me.console.log("ArrayBox push/size: " + arraySize.toString())
# ===== MathBox状態テスト =====
me.console.log("=== MathBox状態テスト ===")
local testMath = new MathBox()
me.console.log("MathBox作成: " + testMath.toString())
local mathResult = testMath.add(5, 3)
me.console.log("MathBox add: " + mathResult.toString())
# ===== SocketBox状態テスト問題箇所 =====
me.console.log("=== SocketBox状態テスト問題箇所 ===")
local testSocket = new SocketBox()
me.console.log("SocketBox作成: " + testSocket.toString())
local beforeBind = testSocket.isServer()
me.console.log("Before bind: isServer = " + beforeBind.toString())
local bindResult = testSocket.bind("127.0.0.1", 18080)
me.console.log("Bind result = " + bindResult.toString())
local afterBind = testSocket.isServer()
me.console.log("After bind: isServer = " + afterBind.toString())
testSocket.close()
# ===== 結果判定 =====
if afterBind.equals(true) {
me.result = "SocketBox正常動作"
} else {
me.result = "SocketBox状態保持失敗 - 他のBoxは正常"
}
me.console.log("🎯 テスト結果: " + me.result)
return me.result
}
}