diff options
author | Li Haoyi <haoyi@dropbox.com> | 2014-11-15 15:59:38 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2014-11-15 15:59:38 -0800 |
commit | 70f9164e167398d75f99130a5325a3411215feb5 (patch) | |
tree | 544264debe08e4d1bb363935f86aa63889727084 /scalatexApi/src/test | |
parent | 50595f9e1b05d33f47e540c24e33e50bd1625315 (diff) | |
download | hands-on-scala-js-70f9164e167398d75f99130a5325a3411215feb5.tar.gz hands-on-scala-js-70f9164e167398d75f99130a5325a3411215feb5.tar.bz2 hands-on-scala-js-70f9164e167398d75f99130a5325a3411215feb5.zip |
works
Diffstat (limited to 'scalatexApi/src/test')
-rw-r--r-- | scalatexApi/src/test/scala/torimatomeru/SyntaxTest.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scalatexApi/src/test/scala/torimatomeru/SyntaxTest.scala b/scalatexApi/src/test/scala/torimatomeru/SyntaxTest.scala new file mode 100644 index 0000000..8d5a0d8 --- /dev/null +++ b/scalatexApi/src/test/scala/torimatomeru/SyntaxTest.scala @@ -0,0 +1,18 @@ +package torimatomeru +import utest._ +import utest.framework.Test +import utest.util.Tree + +object SyntaxTest extends TestSuite{ + def check[T](input: String, parse: ScalaSyntax => scala.util.Try[T], expected: T) = { + val parsed = parse(new ScalaSyntax(input)).get + assert(parsed == expected) + } + def tests = TestSuite{ + + "omg" - check( + """if (true) () else ()""", + _.IfCFlow.run(), () + ) + } +} |