424
|
1 |
import M3._
|
390
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
3 |
|
424
|
4 |
assert(flts(Nil) == Nil)
|
463
|
5 |
assert(flts(ZERO::ZERO::Nil) == List(ZERO))
|
|
6 |
assert(flts(ZERO::ONE::ZERO::ONE::Nil) == List(ZERO))
|
|
7 |
assert(flts(ONE::ALTs(List(ONE))::ONE::Nil) == List(ALTs(List(ONE))))
|
|
8 |
assert(flts(ONE::ALTs(List(ONE))::ONE::ALTs(List(ONE))::Nil) == List(ALTs(List(ONE)), ALTs(List(ONE))))
|
|
9 |
assert(flts(List(CHAR('a'), ONE, ONE, CHAR('b')), Nil) == List(CHAR('a'), CHAR('b')))
|
|
10 |
assert(flts(List(ONE ~ CHAR('a'), CHAR('b') ~ ONE), Nil) == List(ONE, CHAR('a'), CHAR('b'), ONE))
|