aboutsummaryrefslogblamecommitdiff
path: root/test/test/SamplePhaseTest.scala
blob: 47037f1d83c7cf256132938bdd10a7d195a8155a (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                                         
                                         
                                                                          

                                
                                                     
                                                                                                                                                                                                                                                                                                                                                                                        



       
package test

import org.junit.{Assert, Test}

class SamplePhaseTest extends DottyTest {

  // Disabled, awaiting resolution: @Test
  def testTypechekingSimpleClass = checkCompile("frontend", "class A{}") {
    (tree, context) =>
      implicit val ctx = context
      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()))))"
      )
  }

}