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.
This commit is contained in:
31
local_tests/test_state_sharing_validation.nyash
Normal file
31
local_tests/test_state_sharing_validation.nyash
Normal file
@ -0,0 +1,31 @@
|
||||
// 🎯 Phase B-C 验证测试 - 确认状态共享修复是否有效
|
||||
static box Main {
|
||||
init { array_test, map_test, buffer_test, socket_test }
|
||||
main() {
|
||||
// ArrayBox测试
|
||||
local arr
|
||||
arr = new ArrayBox()
|
||||
arr.push("hello")
|
||||
me.array_test = arr.length() // 期待: 1
|
||||
|
||||
// MapBox测试
|
||||
local map
|
||||
map = new MapBox()
|
||||
map.set("key1", "value1")
|
||||
me.map_test = map.size() // 期待: 1
|
||||
|
||||
// BufferBox测试
|
||||
local buf
|
||||
buf = new BufferBox()
|
||||
buf.write([72, 101, 108, 108, 111]) // "Hello"
|
||||
me.buffer_test = buf.length() // 期待: 5
|
||||
|
||||
// SocketBox测试
|
||||
local sock
|
||||
sock = new SocketBox()
|
||||
sock.bind("127.0.0.1", 8080)
|
||||
me.socket_test = 1 // 暂时设为1,表示创建成功
|
||||
|
||||
return me.array_test
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user