diff options
author | DarkDimius <darkdimius@gmail.com> | 2014-03-02 12:38:55 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-03-02 13:12:09 +0100 |
commit | 92a4fefe58cfe4c1bcccc8f98183079a553d477a (patch) | |
tree | 76df2064eea6a6407c6ba2d04ea547aee6be3da2 /test/test/SamplePhaseTest.scala | |
parent | 0ebdbde3d51f92647f3b1cd452d60648ed8e7a39 (diff) | |
parent | 301d0c8a79d56d18fe0ae9c09f350d4364d4baf1 (diff) | |
download | dotty-92a4fefe58cfe4c1bcccc8f98183079a553d477a.tar.gz dotty-92a4fefe58cfe4c1bcccc8f98183079a553d477a.tar.bz2 dotty-92a4fefe58cfe4c1bcccc8f98183079a553d477a.zip |
Merge pull request #31 from DarkDimius/tests
Infrastructure for per-phase tests, with inline source as a string.
Diffstat (limited to 'test/test/SamplePhaseTest.scala')
-rw-r--r-- | test/test/SamplePhaseTest.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test/SamplePhaseTest.scala b/test/test/SamplePhaseTest.scala new file mode 100644 index 000000000..e86f4459b --- /dev/null +++ b/test/test/SamplePhaseTest.scala @@ -0,0 +1,15 @@ +package test + +import org.junit.{Assert, Test} + +class SamplePhaseTest extends DottyTest { + + @Test + def testTypechekingSimpleClass = checkCompile("frontend", "class A{}") { + tree => + Assert.assertTrue("can typecheck simple class", + tree.toString == "PackageDef(Ident(<empty>),List(TypeDef(Modifiers(,,List()),A,Template(DefDef(Modifiers(,,List()),<init>,List(),List(List()),TypeTree[TypeRef(ThisType(module class scala),Unit)],EmptyTree),List(Apply(Select(New(TypeTree[TypeRef(ThisType(module class lang),Object)]),<init>),List())),ValDef(Modifiers(private,,List()),_,EmptyTree,EmptyTree),List()))))" + ) + } + +} |