Files
hakorune/test_async_demo.nyash
Moe Charm 2c5fc374da 🧹 refactor: box_methods.rs大掃除完全成功 - 8モジュールに機能分離
🏗️ アーキテクチャ大幅改善:
• 1822行巨大ファイル → 8つの論理的モジュールに完全分割
• 機能別責任分離でメンテナンス性向上
• ゼロ破壊的変更 - 既存機能すべて正常動作

📂 新モジュール構造:
• basic_methods.rs - StringBox/IntegerBox/BoolBox/FloatBox
• collection_methods.rs - ArrayBox/MapBox
• io_methods.rs - FileBox/ResultBox
• system_methods.rs - TimeBox/DateTimeBox/TimerBox/DebugBox
• math_methods.rs - MathBox/RandomBox
• async_methods.rs - FutureBox/ChannelBox
• web_methods.rs - WebDisplayBox/WebConsoleBox/WebCanvasBox(WASM)
• special_methods.rs - MethodBox/SoundBox

 コード品質向上:
• 可読性 - 機能別分離で理解容易
• 保守性 - 変更影響の局所化
• 拡張性 - 新機能追加が簡単
• テスト性 - 単体テスト作成容易

🎯 プロフェッショナルレベルのコードベース完成\!
Everything is Box哲学の美しい実装構造達成

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-09 16:12:14 +09:00

32 lines
1008 B
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.

# 非同期処理テスト - FutureBoxとChannelBoxのメソッド確認
print("=== Nyash Async Methods Test ===")
# FutureBoxの基本テスト簡単な例
print("\n1. FutureBox Basic Test")
# ChannelBoxの基本テスト
print("\n2. ChannelBox Basic Test")
try {
# ChannelBoxの作成とメソッド呼び出し
channel = new ChannelBox("TestSender", "TestReceiver")
# sendMessageメソッドテスト
message = channel.sendMessage("Hello Async World!")
print("Sent message: " + message.toString())
# announceメソッドテスト
broadcast = channel.announce("Broadcasting test message")
print("Broadcast: " + broadcast)
# sender/receiverメソッドテスト
sender_info = channel.sender()
print("Sender info: " + sender_info.toString())
print("\n✅ ChannelBox methods work correctly!")
} catch (error) {
print("⚠️ ChannelBox test failed: " + error.toString())
}
print("\n=== Async Methods Test Completed ===")