Skip to content

Commit 15a567f

Browse files
committed
[test] add test for mergemesh
1 parent cf2f359 commit 15a567f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,14 @@ tracked in https://github.com/NeuroJSON/pyiso2mesh/issues/1
276276
|`remeshsurf.m` | ✅ tested |
277277
|`smoothsurf.m` | ✅ tested |
278278
|`sortmesh.m` | ⭕️ tested |
279-
|`mergemesh.m` | ⭕️ tested |
279+
|`mergemesh.m` | tested |
280280
|`meshrefine.m` | ✅ tested |
281281
|`mergesurf.m` | ⭕️ tested |
282282
|`surfboolean.m` | ✅ tested |
283283
|`fillsurf.m` | ⭕️ tested |
284-
|`highordertet.m` | ⭕️ tested |
285-
|`elemfacecenter.m` | ⭕️ tested |
286-
|`barydualmesh.m` | ⭕️ tested |
284+
|`highordertet.m` | tested |
285+
|`elemfacecenter.m` | tested |
286+
|`barydualmesh.m` | tested |
287287
|`meshinterp.m` | ⭕️ tested |
288288
|`meshremap.m` | ⭕️ tested |
289289
|`extrudesurf.m` | ⭕️ tested |

test/run_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,14 @@ def test_surfboolean_self(self):
10551055
surfboolean(self.no1, self.el1, "self", self.no2, self.el2)[0], 1
10561056
)
10571057

1058+
def test_mergemesh(self):
1059+
no1, fc1 = mergemesh(self.no1, self.el1, self.no2, self.el2)
1060+
self.assertEqual(no1.shape[0], self.no1.shape[0] + self.no2.shape[0])
1061+
self.assertEqual(no1.shape[0], np.max(fc1))
1062+
no1, fc1 = mergemesh(self.no1, self.el1, self.no2, self.el2, self.no1, self.el1)
1063+
self.assertEqual(no1.shape[0], 2 * self.no1.shape[0] + self.no2.shape[0])
1064+
self.assertEqual(no1.shape[0], np.max(fc1))
1065+
10581066

10591067
class Test_core(unittest.TestCase):
10601068
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)