mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-28 18:42:39 +01:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user