main_testing3/re_test6.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 26 Apr 2024 17:35:36 +0100
changeset 486 9c03b5e89a2a
parent 475 59e005dcf163
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     1
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     2
def urbanmain() = {
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     3
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     4
  import M3._
153
4383809c176a updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
475
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     6
  assert(SEQs_smart(Nil) == ONE)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     7
  assert(SEQs_smart(List(ZERO)) == ZERO)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     8
  assert(SEQs_smart(List(CHAR('a'))) == CHAR('a'))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
     9
  assert(SEQs_smart(List(ONE ~ ONE)) == ONE ~ ONE)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
    10
  assert(SEQs_smart(List(ONE, ONE)) == SEQs(List(ONE, ONE)))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
    11
  assert(ALTs_smart(Nil) == ZERO)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
    12
  assert(ALTs_smart(List(ONE ~ ONE)) == ONE ~ ONE)
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
    13
  assert(ALTs_smart(List(ZERO, ZERO)) == ALTs(List(ZERO, ZERO)))
59e005dcf163 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 433
diff changeset
    14
}