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:
33
local_tests/test_complete_socketbox_fix.nyash
Normal file
33
local_tests/test_complete_socketbox_fix.nyash
Normal file
@ -0,0 +1,33 @@
|
||||
// Complete test for the SocketBox state preservation fix
|
||||
static box Main {
|
||||
init { server }
|
||||
|
||||
main() {
|
||||
print("=== SocketBox State Preservation Test ===")
|
||||
|
||||
// 1. Create new SocketBox
|
||||
me.server = new SocketBox()
|
||||
|
||||
print("=== Before bind ===")
|
||||
print("isServer: " + me.server.isServer())
|
||||
|
||||
// 2. Call bind() which should set is_server=true
|
||||
me.server.bind("127.0.0.1", 8080)
|
||||
|
||||
print("=== After bind ===")
|
||||
print("isServer: " + me.server.isServer())
|
||||
|
||||
// 3. Test multiple accesses
|
||||
print("=== Multiple access test ===")
|
||||
local temp1
|
||||
temp1 = me.server
|
||||
print("temp1.isServer(): " + temp1.isServer())
|
||||
|
||||
local temp2
|
||||
temp2 = me.server
|
||||
print("temp2.isServer(): " + temp2.isServer())
|
||||
|
||||
// If the fix works, all should return true
|
||||
return me.server.isServer()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user