X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/blobdiff_plain/9f4798446bbb3ac43f7b8291ddae095af3818299..2c6add2e9a2fbc48a6421ecd22f2f7fa9cbb15a0:/pypol/tests/test_domains.py diff --git a/pypol/tests/test_domains.py b/pypol/tests/test_domains.py index df7b01c..4d38075 100644 --- a/pypol/tests/test_domains.py +++ b/pypol/tests/test_domains.py @@ -38,10 +38,13 @@ class TestDomain(unittest.TestCase): def test_disjoint(self): self.assertEqual(self.square1.disjoint(), self.disjoint) + self.assertEqual(self.empty.disjoint(), Empty) + self.assertEqual(self.universe.disjoint(), self.universe) def test_isempty(self): self.assertFalse(self.square1.isempty()) self.assertTrue(self.empty.isempty()) + self.assertFalse(self.universe.isempty()) def test_isuniverse(self): self.assertFalse(self.square1.isuniverse()) @@ -54,6 +57,7 @@ class TestDomain(unittest.TestCase): def test_eq(self): self.assertTrue(self.square1 == self.square1) self.assertFalse(self.square1 == self.square2) + self.assertFalse(self.empty == self.universe) def test_isdisjoint(self): self.assertFalse(self.square1.isdisjoint(self.square2)) @@ -147,3 +151,13 @@ class TestDomain(unittest.TestCase): self.assertEqual(self.square1.lexmax(), self.lexmax) self.assertEqual(self.universe.lexmax(), self.universe) self.assertEqual(self.empty.lexmax(), Empty) + + def test_num_parameters(self): + self.assertEqual(self.square1.num_parameters(), 2) + self.assertEqual(self.empty.num_parameters(), 0) + self.assertEqual(self.universe.num_parameters(), 0) + + def test_involves_dims(self): + self.assertTrue(self.square1.involves_dims(symbols('x y'))) + self.assertFalse(self.empty.involves_dims(symbols('x'))) + self.assertFalse(self.universe.involves_dims(symbols('x')))