add tests
This commit is contained in:
15
test/blitz/protocol/packet/PacketFactory_test.cpp
Normal file
15
test/blitz/protocol/packet/PacketFactory_test.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <td/protocol/packet/PacketFactory.h>
|
||||
|
||||
static int Test() {
|
||||
for (std::size_t i = 0; i < static_cast<int>(td::protocol::PacketType::PACKET_COUNT); i++) {
|
||||
td::protocol::PacketType packetType = td::protocol::PacketType(i);
|
||||
|
||||
if (td::protocol::PacketFactory::CreateReadOnlyPacket(packetType)->GetType() != packetType)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main() {
|
||||
return Test();
|
||||
}
|
||||
Reference in New Issue
Block a user