main_marking3/re_test3a.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sat, 11 Mar 2023 22:01:53 +0000
changeset 463 0315d9983cd0
parent 424 daf561a83ba6
permissions -rw-r--r--
updated

import M3._


assert(flts(Nil) == Nil)
assert(flts(ZERO::ZERO::Nil) == List(ZERO))
assert(flts(ZERO::ONE::ZERO::ONE::Nil) == List(ZERO))
assert(flts(ONE::ALTs(List(ONE))::ONE::Nil) == List(ALTs(List(ONE))))
assert(flts(ONE::ALTs(List(ONE))::ONE::ALTs(List(ONE))::Nil) == List(ALTs(List(ONE)), ALTs(List(ONE))))
assert(flts(List(CHAR('a'), ONE, ONE, CHAR('b')), Nil) == List(CHAR('a'), CHAR('b')))
assert(flts(List(ONE ~ CHAR('a'), CHAR('b') ~ ONE), Nil) == List(ONE, CHAR('a'), CHAR('b'), ONE))