Scala 2
API Specification

This document is the API specification for Scala 2.

Trait Summary
`abstract` | `trait` Benchmark `Benchmark` can be used to quickly turn an existing class into a benchmark. Here is a short example:
      object sort1 extends Sorter with Benchmark {
        def run = sort(List.range(1, 1000))
      }
The run method has to be defined by the user, who will perform the timed operation there. Run the benchmark as follows:
      > scala sort1 5 times.log
This will run the benchmark 5 times and log the execution times in a file called `times.log`

Object Summary
| `object` SUnit Unit testing methods in the spirit of JUnit framework. Use these classes like this:
     import scala.testing.SUnit
     import SUnit._

     class MyTest(n: String) extends TestCase(n) {

       override def runTest() = n match {
         case "myTest1" => assertTrue(true)
         case "myTest2" => assertTrue("hello", false)
       }
     }

     val r = new TestResult()
     suite.run(r)
     for (val tf <- r.failures()) {
       Console.println(tf.toString())
     }
| `object` UnitTest Some simple methods to support unit testing with assertions to contain more JUnit style assertions which use Scala's features.