marking3/re1e_test.scala
author Christian Urban <urbanc@in.tum.de>
Thu, 29 Nov 2018 17:15:11 +0000
changeset 221 9e7897f25e13
parent 168 03530cb87cd0
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
168
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
import CW8a._
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
val EVIL_urban = SEQ(STAR(STAR(CHAR('a'))), CHAR('b'))
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
assert(size(der('a', der('a', EVIL_urban))) == 28)
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
assert(size(der('a', der('a', der('a', EVIL_urban)))) == 58)
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
assert(size(ders("aaaaaa".toList, EVIL_urban)) == 8)
03530cb87cd0 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
assert(size(ders(("a" * 50).toList, EVIL_urban)) == 8)