暂存文件

This commit is contained in:
huanglinhuan
2025-12-12 21:54:52 +08:00
parent 96fecf3c6f
commit 91ae52eeb3
13 changed files with 631 additions and 85 deletions

View File

@@ -0,0 +1,34 @@
#include <gtest/gtest.h>
#include "displayflow/core/network/network_interface.h"
using namespace displayflow::core;
class NetworkInterfaceTest : public ::testing::Test {
protected:
void SetUp() override {
// 测试前准备
}
void TearDown() override {
// 测试后清理
}
};
TEST_F(NetworkInterfaceTest, NetworkInterfaceCreation) {
NetworkInterface interface;
interface.type = NetworkType::WiFi;
interface.name = "wlan0";
interface.address = "192.168.1.100";
interface.port = 8888;
interface.isAvailable = true;
EXPECT_EQ(interface.type, NetworkType::WiFi);
EXPECT_EQ(interface.name, "wlan0");
EXPECT_EQ(interface.address, "192.168.1.100");
EXPECT_TRUE(interface.isAvailable);
}
// 添加更多测试...