main_marking3/re_test6.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 13 Jun 2024 13:13:33 +0100
changeset 491 e2ffe8642f55
parent 463 0315d9983cd0
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 390
diff changeset
     1
import M3._
390
175a950470a9 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     2
463
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
     3
assert(SEQs_smart(Nil) == ONE)
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
     4
assert(SEQs_smart(List(ZERO)) == ZERO)
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
     5
assert(SEQs_smart(List(CHAR('a'))) == CHAR('a'))
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
     6
assert(SEQs_smart(List(ONE ~ ONE)) == ONE ~ ONE)
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
     7
assert(SEQs_smart(List(ONE, ONE)) == SEQs(List(ONE, ONE)))
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
     8
assert(ALTs_smart(Nil) == ZERO)
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
     9
assert(ALTs_smart(List(ONE ~ ONE)) == ONE ~ ONE)
0315d9983cd0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 424
diff changeset
    10
assert(ALTs_smart(List(ZERO, ZERO)) == ALTs(List(ZERO, ZERO)))