This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar-2022/src/packet_io/test/gtest_packet_io.cpp

23 lines
683 B
C++
Raw Normal View History

#include <gtest/gtest.h>
#include "../packet_io.h"
TEST(PACKET_IO_Test, packet_io_instance_create) {
struct packet_io_config ppio_config;
struct packet_io_instance *ppio_inst = packet_io_instance_create("stellar", PACKET_IO_RUN_MODE_PCAP_FILE, 2);
EXPECT_NE(ppio_inst, nullptr);
}
2022-07-26 15:05:14 +08:00
TEST(PACKET_IO_Test, packet_io_open_device) {
struct packet_io_config ppio_config;
struct packet_io_instance *ppio_inst = packet_io_instance_create("stellar", PACKET_IO_RUN_MODE_PCAP_FILE, 2);
2022-07-29 13:31:09 +08:00
EXPECT_EQ(packet_io_device_open(ppio_inst, nullptr, 1, 1), nullptr);
}
int main(int argc, char ** argv)
{
int ret=0;
::testing::InitGoogleTest(&argc, argv);
ret=RUN_ALL_TESTS();
return ret;
}