X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/90d7f21ee1486524f499f66ef546a24331b2009c..fb070deb31a82b789e1be4ffc5dfa64b4b7a9e36:/pypol/tests/test_domains.py?ds=sidebyside 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')))