test: expand channelserver coverage from 20% to 25%

Add tests for:
- Discord handlers (getPlayerSlice, getCharacterList)
- House handlers (boxToBytes, HouseData, Title structs)
- Mail struct tests
- Mercenary handlers (Partner, HunterNavi structs)
- Shop/Gacha handlers (writeShopItems, ShopItem, Gacha structs)
- Additional handler coverage for guild, tower, and simple handlers
- Stage handler tests for binary operations and enumeration
- Channel server tests for BroadcastMHF and session management
This commit is contained in:
Houmgaor
2026-02-02 16:02:01 +01:00
parent 2d8f1d3b41
commit 7e9440d8cc
14 changed files with 2162 additions and 0 deletions

View File

@@ -26,3 +26,28 @@ func TestHandleMsgMhfGetRengokuRankingRank(t *testing.T) {
t.Error("No response packet queued")
}
}
func TestRengokuScoreStruct(t *testing.T) {
score := RengokuScore{
Name: "TestPlayer",
Score: 12345,
}
if score.Name != "TestPlayer" {
t.Errorf("Name = %s, want TestPlayer", score.Name)
}
if score.Score != 12345 {
t.Errorf("Score = %d, want 12345", score.Score)
}
}
func TestRengokuScoreStruct_DefaultValues(t *testing.T) {
score := RengokuScore{}
if score.Name != "" {
t.Errorf("Default Name should be empty, got %s", score.Name)
}
if score.Score != 0 {
t.Errorf("Default Score should be 0, got %d", score.Score)
}
}