skia2/resources/sksl/errors
John Stiles 463fad21ba Add test for duplicate default switch-case.
Surprisingly, this error is actually caught by our parser, which
interprets the default label in a unique way. From the parser comments:

  "Requiring default: to be last (in defiance of C and GLSL) was a
   deliberate decision. Other parts of the compiler may rely upon this
   assumption."

The comment is true--we don't check for duplicate default switch-case
labels anywhere else in the code, just here in the parser.

We rely on this, so we should have a test for it.

Change-Id: I6df5c565aca4d4b8565b96638dce9504efc39ccc
Bug: skia:11340
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372617
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-19 20:31:50 +00:00
..
ArgumentCountMismatch.sksl
ArgumentMismatch.sksl
ArgumentModifiers.sksl
ArrayConstructorElementCount.sksl Reject array constructors with the wrong number of elements. 2021-02-03 22:33:02 +00:00
ArrayIndexOutOfRange.sksl
ArrayOfVoid.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayOfVoidInStruct.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayReturnTypes.sksl
ArraySplitDimensions.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArraySplitDimensionsInFuncBody.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArraySplitDimensionsInFuncDecl.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArraySplitDimensionsInStruct.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTooManyDimensions.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTooManyDimensionsInFuncBody.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTooManyDimensionsInFuncDecl.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTooManyDimensionsInStruct.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTypeTooManyDimensions.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTypeTooManyDimensionsInFuncBody.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTypeTooManyDimensionsInFuncDecl.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayTypeTooManyDimensionsInStruct.sksl Fix assertion when arrays are double-declared. 2021-02-12 23:49:04 +00:00
ArrayUnspecifiedDimensions.sksl
AssignmentTypeMismatch.sksl Clean up type coercion code and IRGenerator::checkValid(). 2021-02-17 22:39:48 +00:00
BadCaps.sksl
BadFieldAccess.sksl
BadIndex.sksl
BadModifiers.sksl Remove "buffer" modifier from SkSL 2021-02-18 21:48:05 +00:00
BinaryInvalidType.sksl SkSL: Ensure struct declarations contain at least one member 2021-02-12 20:57:56 +00:00
BinaryTypeCoercion.sksl
BinaryTypeMismatch.sksl
BitShiftFloat.sksl
BitShiftFloatMatrix.sksl
BitShiftFloatVector.sksl
BooleanArithmetic.sksl
BreakOutsideLoop.sksl
CallNonFunction.sksl
CanExitWithoutReturningValue.sksl
ConstructorArgumentCount.sksl
ConstructorTypeMismatch.sksl
ContinueOutsideLoop.sksl
DivideByZero.sksl
DoTypeMismatch.sksl
DuplicateFunction.sksl
DuplicateOutput.sksl
DuplicateSymbol.sksl
EmptyStruct.sksl SkSL: Ensure struct declarations contain at least one member 2021-02-12 20:57:56 +00:00
EnumValueMustBeConstInt.sksl
ErrorsInDeadCode.sksl
FloatRemainder.sksl
ForTypeMismatch.sksl
GenericArgumentMismatch.sksl
GrBadIn.fp
GrMainParameterWrongType.fp
GrMainTooManyParameters.fp
GrNoFragmentProcessorConstruction.fp
GrNoFragmentProcessorExpressions.fp
GrNoFragmentProcessorLocals.fp
GrNoFragmentProcessorParams.fp
GrNoFragmentProcessorReturn.fp
GrRecursion.fp
IfTypeMismatch.sksl
InlineDivideByZero.sksl Added detection for non-constant-folded divide by zero errors in 2021-02-06 03:13:16 +00:00
InterfaceBlockScope.sksl
InterfaceBlockStorageModifiers.sksl
InterfaceBlockWithNoMembers.sksl
InvalidAssignment.sksl
InvalidOutParams.sksl
InvalidToken.sksl
InvalidUnary.sksl SkSL: Ensure struct declarations contain at least one member 2021-02-12 20:57:56 +00:00
InVarWithInitializerExpression.sksl
MismatchedNumbers.sksl
ModifiersInStruct.sksl Remove "buffer" modifier from SkSL 2021-02-18 21:48:05 +00:00
OpaqueTypeAssignment.sksl
OpaqueTypeConstruction.sksl
OpaqueTypeInArray.sksl
OpaqueTypeInInterfaceBlock.sksl
OpaqueTypeInStruct.sksl
OpenArray.sksl
Ossfuzz26700.sksl
Ossfuzz26759.sksl
Ossfuzz27650.sksl
Ossfuzz27663.sksl
Ossfuzz29085.sksl
Ossfuzz29845.sksl
Ossfuzz29849.sksl Fix fuzzer-discovered error with variable scoping. 2021-01-26 17:08:59 +00:00
OverflowFloatLiteral.sksl
OverflowIntLiteral.sksl
OverflowParamArraySize.sksl
OverflowUintLiteral.sksl
PrivateTypes.sksl
PrototypeInFuncBody.sksl Improve error reporting for invalid var-decls. 2021-02-12 22:26:36 +00:00
RedeclareBasicType.sksl
RedeclareEnum.sksl
RedeclareSamplerType.sksl
RedeclareStruct.sksl
RedeclareStructTypeWithName.sksl
RedeclareUserType.sksl
RedeclareVariable.sksl
ReturnDifferentType.sksl
ReturnFromVoid.sksl
ReturnMissingValue.sksl
ReturnTypeMismatch.sksl
SelfReferentialInitializerExpression.sksl
SpuriousFloat.sksl
StaticIfTest.sksl
StaticSwitchConditionalBreak.sksl
StaticSwitchTest.sksl Move static-switch and static-if tests out of scanCFG. 2021-02-12 15:32:32 +00:00
StructNameWithoutIdentifier.sksl Remove ASTNode::TypeData 2021-01-28 16:56:59 +00:00
StructTooDeeplyNested.sksl
SwitchDuplicateCase.sksl
SwitchDuplicateDefault.sksl Add test for duplicate default switch-case. 2021-02-19 20:31:50 +00:00
SwitchTypes.sksl Disallow initializers on uniform variables 2021-02-18 01:01:38 +00:00
SwizzleConstantOutput.sksl
SwizzleMatrix.sksl
SwizzleOnlyLiterals.sksl
SwizzleOutOfBounds.sksl
SwizzleTooManyComponents.sksl
TernaryMismatch.sksl
UndeclaredFunction.sksl
UndefinedFunction.sksl
UndefinedSymbol.sksl
UniformVarWithInitializerExpression.sksl Disallow initializers on uniform variables 2021-02-18 01:01:38 +00:00
UnknownDivideByZero.sksl Added detection for non-constant-folded divide by zero errors in 2021-02-06 03:13:16 +00:00
Unreachable.sksl
UnscopedVariableInDoWhile.sksl Fix fuzzer-discovered error with variable scoping. 2021-01-26 17:08:59 +00:00
UnscopedVariableInElse.sksl Fix fuzzer-discovered error with variable scoping. 2021-01-26 17:08:59 +00:00
UnscopedVariableInIf.sksl Fix fuzzer-discovered error with variable scoping. 2021-01-26 17:08:59 +00:00
UnscopedVariableInWhile.sksl Fix fuzzer-discovered error with variable scoping. 2021-01-26 17:08:59 +00:00
UnsupportedGLSLIdentifiers.sksl
UseWithoutInitializeArrayIndex.sksl
UseWithoutInitializeBinaryExpr.sksl
UseWithoutInitializeDeadIf.sksl
UseWithoutInitializeDeadSwitch.sksl
UseWithoutInitializeReturnValue.sksl
UseWithoutInitializeVarDecl.sksl
UsingInvalidValue.sksl
WhileTypeMismatch.sksl