v0.1.0: 初始工程骨架 — 7模块 40头文件 32源文件 17文档 Apache-2.0

This commit is contained in:
ViewDesignEngine
2026-07-23 05:27:51 +00:00
commit 02d0520aa5
133 changed files with 5350 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#include <gtest/gtest.h>
#include "vde/core/convex_hull.h"
using namespace vde::core;
TEST(ConvexHullTest, ThreePoints_ReturnsTriangle) {
std::vector<Point2D> pts = {{0,0}, {1,0}, {0,1}};
auto hull = convex_hull_2d(pts);
EXPECT_EQ(hull.size(), 3u);
}
TEST(ConvexHullTest, CollinearPoints_ReturnsEndpoints) {
std::vector<Point2D> pts = {{0,0}, {1,1}, {2,2}, {3,3}};
auto hull = convex_hull_2d(pts);
EXPECT_GE(hull.size(), 2u);
}
TEST(ConvexHullTest, Empty_ReturnsEmpty) {
auto hull = convex_hull_2d({});
EXPECT_TRUE(hull.empty());
}