Files
WoW-Hybrid-gateway/tests/native_client_drop_diagnostic_test.cpp
praxisandClaude Fable 5.2 7f2139d8d0 Offline test fixtures
883 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

18 lines
958 B
C++

#include "../native/client_drop_diagnostic.h"
#include <cassert>
#include <cstring>
int main(){
static_assert(GW_WIRE_TRANSPORT_OPEN_IPV4_BYTES==44&&GW_WIRE_INITIAL_SPELL_IDS==45&&GW_WIRE_DIAGNOSTIC_CLIENT_DROP==46);
static_assert(sizeof(gw_wire_call)==640);
gw_wire_call call;std::memset(&call,0xa5,sizeof(call));
gw_client_drop_call_init(&call,0x3f00db,17);
assert(call.abi==1&&call.size==640&&call.operation==46&&call.opcode==0x3f00db&&call.build==17);
assert(!call.input&&!call.input_bytes&&!call.output&&!call.capacity&&!call.login&&!call.transport&&!call.index);
call.abi=call.size=call.operation=call.opcode=call.build=0;
unsigned char zero[sizeof(call)]{};assert(!std::memcmp(&call,zero,sizeof(call)));
assert(!gw_client_drop_should_count(0x420064,4));
assert(gw_client_drop_should_count(0x420064,5));
assert(gw_client_drop_should_count(0x3f00db,17));
assert(gw_client_drop_should_count(0x2e6,0)); // metadata is allowed for any opcode
}