Created
August 17, 2016 13:25
-
-
Save mossprescott/2699d6261d67ed9e52b24f69bcaf01df to your computer and use it in GitHub Desktop.
Reducing bytecode size by extending an abstract class instead of a trait (per paulp)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Use Qspec if you can, QuasarSpecification only if you must. | |
| * An abstract class allows the many trait forwarders to be reused | |
| * by all the subclasses. Mixing in the trait means that your | |
| * specification sprouts hundreds of pure forwarders. | |
| */ | |
| abstract class Qspec extends QuasarSpecification | |
| trait QuasarSpecification extends AnyRef | |
| with org.specs2.mutable.SpecLike | |
| with org.specs2.matcher.ShouldExpectations | |
| with org.specs2.matcher.MatchResultCombinators | |
| with org.specs2.matcher.ValueChecks | |
| with org.specs2.execute.PendingUntilFixed | |
| with org.specs2.ScalaCheck | |
| with org.specs2.scalaz.ScalazMatchers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment