-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP-MERGE: cleaning from merge diffcheck joint detector
- Loading branch information
Showing
5 changed files
with
79 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule eigen
updated
from 27f817 to 02bcf9
Submodule pybind11
updated
15 files
+1 −1 | .pre-commit-config.yaml | |
+2 −0 | CMakeLists.txt | |
+13 −2 | include/pybind11/cast.h | |
+5 −1 | include/pybind11/pybind11.h | |
+5 −0 | include/pybind11/pytypes.h | |
+1 −0 | tests/extra_python_package/test_files.py | |
+1 −0 | tests/test_pytypes.cpp | |
+2 −0 | tests/test_pytypes.py | |
+39 −2 | tests/test_type_caster_pyobject_ptr.cpp | |
+16 −0 | tests/test_type_caster_pyobject_ptr.py | |
+1 −1 | tools/FindPythonLibsNew.cmake | |
+11 −1 | tools/pybind11Common.cmake | |
+86 −0 | tools/pybind11GuessPythonExtSuffix.cmake | |
+90 −60 | tools/pybind11NewTools.cmake | |
+161 −0 | tools/test-pybind11GuessPythonExtSuffix.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <gtest/gtest.h> | ||
|
||
// Function to test | ||
int add(int a, int b) { | ||
return a + b; | ||
} | ||
|
||
// Test case | ||
TEST(AddTest, HandlesPositiveInput) { | ||
EXPECT_EQ(6, add(2, 4)); | ||
} | ||
|
||
// Main function | ||
int main(int argc, char **argv) { | ||
::testing::InitGoogleTest(&argc, argv); | ||
return RUN_ALL_TESTS(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <gtest/gtest.h> | ||
#include "diffCheck.hh" | ||
|
||
|
||
TEST(DFPointCloudTest, TestConstructor) { | ||
std::vector<Eigen::Vector3d> points = {Eigen::Vector3d(1, 2, 3)}; | ||
std::vector<Eigen::Vector3d> colors = {Eigen::Vector3d(255, 255, 255)}; | ||
std::vector<Eigen::Vector3d> normals = {Eigen::Vector3d(0, 0, 1)}; | ||
|
||
diffCheck::geometry::DFPointCloud dfPointCloud(points, colors, normals); | ||
|
||
// Verify that the points, colors, and normals are set correctly | ||
EXPECT_EQ(dfPointCloud.Points[0], points[0]); | ||
EXPECT_EQ(dfPointCloud.Colors[0], colors[0]); | ||
EXPECT_EQ(dfPointCloud.Normals[0], normals[0]); | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
::testing::InitGoogleTest(&argc, argv); | ||
return RUN_ALL_TESTS(); | ||
} |