Skip to content

Commit 785502b

Browse files
committed
test: add test of id helper
1 parent 4c12269 commit 785502b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

unittest/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ add_python_lib_unit_test("py-deprecation-policy"
113113
add_python_lib_unit_test("py-return-by-ref"
114114
"unittest/python/test_return_by_ref.py")
115115
add_python_lib_unit_test("py-eigen-ref" "unittest/python/test_eigen_ref.py")
116+
add_python_lib_unit_test("py-id" "unittest/python/test_id.py")
116117

117118
if(NOT NUMPY_WITH_BROKEN_UFUNC_SUPPORT)
118119
add_python_lib_unit_test("py-user-type" "unittest/python/test_user_type.py")

unittest/python/test_id.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import eigenpy
2+
3+
ldlt1 = eigenpy.LDLT()
4+
ldlt2 = eigenpy.LDLT()
5+
6+
id1 = ldlt1.id()
7+
id2 = ldlt2.id()
8+
9+
assert id1 != id2
10+
assert id1 == ldlt1.id()
11+
assert id2 == ldlt2.id()

0 commit comments

Comments
 (0)