示例#1
0
 def test_4(self):
     r = RegexTree("(0.(0|(1.0))*)")
     self.assertTrue((regex_match(r, "001010")))
示例#2
0
 def test_2(self):
     r = RegexTree("(0.(1|e))*")
     self.assertTrue((regex_match(r, "000")))
示例#3
0
 def test_3(self):
     r = RegexTree("(1.(0.1)*)")
     self.assertTrue((regex_match(r, "10101")))
示例#4
0
 def test_1_1(self):
     ''' Testing with r = 1, s = 1.'''
     r = RegexTree("1")
     self.assertTrue((regex_match(r, "1")))
示例#5
0
 def test_1(self):
     r = RegexTree("(0.(1|0))*")
     self.assertTrue((regex_match(r, "010001")))
示例#6
0
 def test_1_1(self):
     ''' Testing with r = 1, s = 1.'''
     r = RegexTree("1")
     self.assertTrue((regex_match(r, "1")))
示例#7
0
 def test_4(self):
     r = RegexTree("(0.(0|(1.0))*)")
     self.assertTrue((regex_match(r, "001010")))
示例#8
0
 def test_3(self):
     r = RegexTree("(1.(0.1)*)")
     self.assertTrue((regex_match(r, "10101")))
示例#9
0
 def test_2(self):
     r = RegexTree("(0.(1|e))*")
     self.assertTrue((regex_match(r, "000")))
示例#10
0
 def test_1(self):
     r = RegexTree("(0.(1|0))*")
     self.assertTrue((regex_match(r, "010001")))