diff --git a/testdata/src/default-case-required/default-not-required/default_not_required.go b/testdata/src/default-case-required/default-not-required/default_not_required.go index 03cd18c..f02dce8 100644 --- a/testdata/src/default-case-required/default-not-required/default_not_required.go +++ b/testdata/src/default-case-required/default-not-required/default_not_required.go @@ -45,3 +45,16 @@ func _e(t dcr.T) { default: } } + + func _f() { + // should not report because these are not enum switch + // statements. + var x int + switch x { + case 0: + } + + switch { + case x == 0: + } +} diff --git a/testdata/src/default-case-required/default-required/default_required.go b/testdata/src/default-case-required/default-required/default_required.go index e196f40..33ce104 100644 --- a/testdata/src/default-case-required/default-required/default_required.go +++ b/testdata/src/default-case-required/default-required/default_required.go @@ -35,3 +35,16 @@ func _d(t dcr.T) { default: } } + + func _e() { + // should not report because these are not enum switch + // statements. + var x int + switch x { + case 0: + } + + switch { + case x == 0: + } +}