test: increase total coverage from 46.1% to 50.5%

- Fix duplicate test declarations across coverage2, misc, mercenary, event files
- Fix signserver TestHandlePacketDELETE timeout (multi-write pipe deadlock)
- Fix entranceserver build error (invalid -1 for uint16 port)
- Add handlers_reserve_test.go covering all 56 reserve handler stubs
- Add handlers_coverage3_test.go with 115+ handler tests
- Add handlers_register_test.go with 55 Raviente register/load tests
- Add handlers_coverage_test.go, signserver, entranceserver, usercheck tests
This commit is contained in:
Houmgaor
2026-02-08 18:42:55 +01:00
parent 6d18de01eb
commit e7eab936a9
13 changed files with 7008 additions and 176 deletions

View File

@@ -568,30 +568,3 @@ func TestDistributionItemStruct(t *testing.T) {
t.Errorf("ItemID = %d, want 1234", item.ItemID)
}
}
// Login boost struct test
func TestLoginBoostStruct(t *testing.T) {
boost := loginBoost{
WeekReq: 1,
WeekCount: 2,
Active: true,
}
if boost.WeekReq != 1 {
t.Errorf("WeekReq = %d, want 1", boost.WeekReq)
}
if !boost.Active {
t.Error("Active should be true")
}
}
// ActiveFeature struct test
func TestActiveFeatureStruct(t *testing.T) {
feature := activeFeature{
ActiveFeatures: 0x0FFF,
}
if feature.ActiveFeatures != 0x0FFF {
t.Errorf("ActiveFeatures = %x, want 0x0FFF", feature.ActiveFeatures)
}
}