added real tests to the subd.cc.TestCC class

This commit is contained in:
Stephen M. McQuay
2012-05-15 23:51:48 -06:00
parent 71f99ba58d
commit 1a317781cf
3 changed files with 33 additions and 11 deletions
+15
View File
@@ -25,5 +25,20 @@ class TestCC(unittest.TestCase):
for i in xrange(len(a)):
self.assertAlmostEqual(a[i], b[i])
def test_vert_count(self):
p = PolygonMesh(**self.cube)
p2 = cc.refine(p)
self.assertEqual(len(p2.vertices), 26)
def test_edge_count(self):
p = PolygonMesh(**self.cube)
p2 = cc.refine(p)
self.assertEqual(len(p2.edges), 48)
def test_face_count(self):
p = PolygonMesh(**self.cube)
p2 = cc.refine(p)
self.assertEqual(len(p2.faces), 24)
if __name__ == '__main__':
unittest.main(verbosity=3)