summaryrefslogtreecommitdiff
path: root/test/files/run/large_class.scala
blob: aa486ef8f7edfe94a9b77f3ff0688638868a392a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import scala.tools.partest._
import java.io.{Console => _, _}

// a cold run of partest takes about 15s for this test on my laptop
object Test extends DirectTest {
  override def extraSettings: String = "-usejavacp -d " + testOutput.path

  def s(n: Int) = "\""+n+"\""

  override def code
    = s"""
      |class BigEnoughToFail {
      |  def m(a: String, b: String, c: String, d: String, e: String, f: String) = null
      |  ${(1 to 5500) map (n => "def f"+n+" = m("+ s(n+10000)+","+
                                                    s(n+20000)+","+
                                                    s(n+30000)+","+
                                                    s(n+40000)+","+
                                                    s(n+50000)+","+
                                                    s(n+60000)+")") mkString ";"}
      |}""".stripMargin.trim

  override def show(): Unit = {
    Console.withErr(System.out) {
      compile()
    }
  }
}