--- a/testing4/re_test4.scala Thu Oct 31 11:33:02 2019 +0000
+++ b/testing4/re_test4.scala Thu Oct 31 12:01:56 2019 +0000
@@ -1,27 +1,19 @@
+import CW9c._
val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
-//println("1")
-assert(ders("aaaaa".toList, EVIL_urban) == SEQ(SEQ(STAR(CHAR('a')),STAR(STAR(CHAR('a')))),CHAR('b')))
-//println("2")
+assert(ders(("a" * 5).toList, EVIL_urban) == SEQ(SEQ(STAR(CHAR('a')),STAR(STAR(CHAR('a')))),CHAR('b')))
assert(ders(List('b'), EVIL_urban) == ONE)
-//println("3")
-assert(ders("bb".toList, EVIL_urban) == ZERO)
-//println("4")
+assert(ders(List('b','b'), EVIL_urban) == ZERO)
assert(matcher(EVIL_urban, "a" * 5 ++ "b") == true)
-//println("5")
+assert(matcher(EVIL_urban, "a" * 50 ++ "b") == true)
+assert(matcher(EVIL_urban, "a" * 50) == false)
assert(matcher(EVIL_urban, "b") == true)
-//println("6")
assert(matcher(EVIL_urban, "bb") == false)
-//println("7")
assert(matcher("abc", "abc") == true)
-//println("8")
+assert(matcher("abc", "ab") == false)
assert(matcher(("ab" | "a") ~ (ONE | "bc"), "abc") == true)
-//println("9")
assert(matcher(ONE, "") == true)
-//println("10")
assert(matcher(ZERO, "") == false)
-//println("11")
assert(matcher(ONE | CHAR('a'), "") == true)
-//println("12")
assert(matcher(ONE | CHAR('a'), "a") == true)