예제 #1
0
 def test_complex_condition(self):
     self.assertEqual(
         "u[3, 4, 1, 2, 5, 6, (not(7) - (8 - 9)), 10, 11, ^[15, 16, 12, 13, 14, n[19, 20, 21, 17, 18]]]",
         str(
             union(
                 "1", "2",
                 union("3", "4"),
                 union("5", "6"),
                 subtract(
                     negate("7"),
                     subtract("8", "9")
                 ),
                 union("10"),
                 "11",
                 xor(
                     "12", negate(negate("13")), "14",
                     xor("15", "16"),
                     intersect(
                         "17", "18",
                         intersect("19", "20", "21")
                     )
                 )
             )
         )
     )
예제 #2
0
 def test_complex_condition(self):
     self.assertEqual(
         "u[3, 4, 1, 2, 5, 6, (not(7) - (8 - 9)), 10, 11, ^[15, 16, 12, 13, 14, n[19, 20, 21, 17, 18]]]",
         str(
             union(
                 "1", "2",
                 union("3", "4"),
                 union("5", "6"),
                 subtract(
                     negate("7"),
                     subtract("8", "9")
                 ),
                 union("10"),
                 "11",
                 xor(
                     "12", negate(negate("13")), "14",
                     xor("15", "16"),
                     intersect(
                         "17", "18",
                         intersect("19", "20", "21")
                     )
                 )
             )
         )
     )
 def test_intersect(self):
     self.assertEqual(
         "n[1, 2, 3]",
         str(intersect("1", "2", LeafNode("3"))),
     )
예제 #4
0
 def test_intersect(self):
     self.assertEqual(
         "n[1, 2, 3]",
         str(intersect("1", "2", LeafNode("3"))),
     )