Added tests for #1248
Fixed #1248 allow non-enumerated types in switch