Helper functions symbolname and symbolnames
[linpy.git] / pypol / tests / test_domains.py
index 0e06771..55853fd 100644 (file)
@@ -19,7 +19,7 @@ class TestDomain(unittest.TestCase):
         self.universe = Polyhedron([])
         self.empty = Empty
         self.disjoint = And(Ge(x, 0), Ge(-x + 2, 0), Ge(y, 0), Ge(-y + 2, 0))
         self.universe = Polyhedron([])
         self.empty = Empty
         self.disjoint = And(Ge(x, 0), Ge(-x + 2, 0), Ge(y, 0), Ge(-y + 2, 0))
-        self.compliment = Or(Ge(-x - 1, 0), Ge(x - 3, 0), And(Ge(x, 0), Ge(-x + 2, 0), Ge(-y - 1, 0)), And(Ge(x, 0), Ge(-x + 2, 0), Ge(y - 3, 0)))
+        self.complement = Or(Ge(-x - 1, 0), Ge(x - 3, 0), And(Ge(x, 0), Ge(-x + 2, 0), Ge(-y - 1, 0)), And(Ge(x, 0), Ge(-x + 2, 0), Ge(y - 3, 0)))
         self.hull = And(Ge(x, 0), Ge(-x + 2, 0), Ge(y, 0), Ge(-y + 2, 0))
         self.dropped = And(Ge(y, 0), Ge(-y + 2, 0))
         self.sample = And(Eq(y - 3, 0), Eq(x - 1, 0))
         self.hull = And(Ge(x, 0), Ge(-x + 2, 0), Ge(y, 0), Ge(-y + 2, 0))
         self.dropped = And(Ge(y, 0), Ge(-y + 2, 0))
         self.sample = And(Eq(y - 3, 0), Eq(x - 1, 0))
@@ -71,17 +71,17 @@ class TestDomain(unittest.TestCase):
         self.assertTrue(self.square4 < self.square3)
         self.assertFalse(self.square3 < self.square4)
 
         self.assertTrue(self.square4 < self.square3)
         self.assertFalse(self.square3 < self.square4)
 
-    def test_compliment(self):
-        self.assertEqual(~self.square1, self.compliment)
+    def test_complement(self):
+        self.assertEqual(~self.square1, self.complement)
 
     def test_polyhedral_hull(self):
         self.assertEqual(self.square1.polyhedral_hull(), self.hull)
 
 
     def test_polyhedral_hull(self):
         self.assertEqual(self.square1.polyhedral_hull(), self.hull)
 
-    def test_drop_dims(self):
-        self.assertEqual(self.square1.drop_dims('x'), self.dropped)
-        self.assertEqual(self.square1.drop_dims('x y'), self.universe)
-        self.assertEqual(self.universe.drop_dims(' '), self.universe)
-        self.assertEqual(self.empty.drop_dims(' '), Empty)
+    def test_project_out(self):
+        self.assertEqual(self.square1.project_out('x'), self.dropped)
+        self.assertEqual(self.square1.project_out('x y'), self.universe)
+        self.assertEqual(self.universe.project_out(' '), self.universe)
+        self.assertEqual(self.empty.project_out(' '), Empty)
 
     def test_simplify(self):
         self.assertEqual(self.universe.simplify(), self.universe)
 
     def test_simplify(self):
         self.assertEqual(self.universe.simplify(), self.universe)