summaryrefslogtreecommitdiff
path: root/test/junit
Commit message (Collapse)AuthorAgeFilesLines
* SI-7614 Minimize the times of evaluation f in TraversableOnce.maxBy/minBy.yllan2013-07-061-0/+70
| | | | | | | | | | | | | In the previous implementation, maxBy/minBy will evaluate most of its elements with f twice to get the ordering. That results (2n - 2) evaluations of f. I save both the element and result of evaluation to a tuple so that it doesn't need to re-evaluate f on next comparison. Thus only n evaluations of f, that is the optimal. Note that the original implementation always returns the first matched if more than one element evaluated to same largest/smallest value of f. I document this behavior explicitly in this commit as well.
* Move WeakHashSetTest to junit tests.Grzegorz Kossakowski2013-06-161-0/+171
| | | | | | The WeakHashSetTest was written as unit test but put into partest's `run` category as we were missing direct unit testing support. That got fixed so moving the test now.
* Add support for JUnit testsGrzegorz Kossakowski2013-06-151-0/+17
Add `test.junit` ant target that compiles and runs JUnit tests found in `test/junit` directory. Add `scala.tools.nsc.SampleTest` that demonstrates working testing infrastructure.