main_marking3/re_test3a.scala
changeset 463 0315d9983cd0
parent 424 daf561a83ba6
equal deleted inserted replaced
462:34feeb53c0ba 463:0315d9983cd0
     1 import M3._
     1 import M3._
     2 
     2 
     3 
     3 
     4 assert(flts(Nil) == Nil)
     4 assert(flts(Nil) == Nil)
     5 assert(flts(ZERO::ZERO::Nil) == Nil)
     5 assert(flts(ZERO::ZERO::Nil) == List(ZERO))
     6 assert(flts(ZERO::ONE::ZERO::ONE::Nil) == List(ONE, ONE))
     6 assert(flts(ZERO::ONE::ZERO::ONE::Nil) == List(ZERO))
     7 assert(flts(ONE::ALTs(List(ONE))::ONE::Nil) == List(ONE, ONE, ONE))
     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(ONE, ONE, ONE, 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))