]> Cypherpunks repositories - gostls13.git/commitdiff
test: expand switch dead code test to include a range
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 16 Jun 2016 20:39:16 +0000 (13:39 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 23 Aug 2016 05:12:39 +0000 (05:12 +0000)
Change-Id: If443ffb50b140c466dcf4cc5340f44948bfa46a9
Reviewed-on: https://go-review.googlesource.com/26765
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
test/fixedbugs/issue9608.dir/issue9608.go

index 56b52cc606512be821da103151c6c366d3375b4f..ca82ded4cd0d2b4283a8c97c4b807f6d455873a4 100644 (file)
@@ -67,6 +67,15 @@ func init() {
        case true:
                fail()
        }
+
+       // Test dead code elimination in large ranges.
+       switch 5 {
+       case 3, 4, 5, 6, 7:
+       case 0, 1, 2:
+               fail()
+       default:
+               fail()
+       }
 }
 
 func main() {