diff options
author | Dmitry Petrashko <dark@d-d.me> | 2017-01-11 17:07:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 17:07:02 +0100 |
commit | 8b44b6c1fb0f03a555834d189b98ef30091153fe (patch) | |
tree | a5d030608d8751bdcf583076ff081d70eb87adaa /bench/tests/exhaustivity-S.scala | |
parent | e9165e46e24370e9e5dcccf2c49470ab00e30507 (diff) | |
parent | 157481b24e00c87ba3d44a28dd07c70c28001f0e (diff) | |
download | dotty-8b44b6c1fb0f03a555834d189b98ef30091153fe.tar.gz dotty-8b44b6c1fb0f03a555834d189b98ef30091153fe.tar.bz2 dotty-8b44b6c1fb0f03a555834d189b98ef30091153fe.zip |
Merge pull request #1690 from dotty-staging/bench
Fix benchmarks and add multiple mini benchmark tests
Diffstat (limited to 'bench/tests/exhaustivity-S.scala')
-rw-r--r-- | bench/tests/exhaustivity-S.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bench/tests/exhaustivity-S.scala b/bench/tests/exhaustivity-S.scala new file mode 100644 index 000000000..ba4fef3fd --- /dev/null +++ b/bench/tests/exhaustivity-S.scala @@ -0,0 +1,20 @@ + +sealed trait O +object A extends O +object B extends O + +object Test { + + def test(x: O) = + (x, x, x, x, x, x, x, x, x, x, x, x, x, x) match { + case (A, A, _, _, _, _, _, _, _, _, _, _, _, _) => 1 + case (_, _, A, A, _, _, _, _, _, _, _, _, _, _) => 2 + case (_, _, _, _, A, A, _, _, _, _, _, _, _, _) => 3 + case (_, _, _, _, _, _, A, A, _, _, _, _, _, _) => 4 + case (_, _, _, _, _, _, _, _, A, A, _, _, _, _) => 5 + case (_, _, _, _, _, _, _, _, _, _, A, A, _, _) => 6 + case (_, _, _, _, _, _, _, _, _, _, _, _, A, A) => 7 + case (B, A, B, A, B, A, B, A, B, A, B, A, B, A) => 8 + + } +} |