skia2/tests/sksl/errors/EnumValueMustBeConstInt.sksl
John Stiles 6798e5d0d1 Migrate SkSL error tests to golden outputs.
Change-Id: Ic8f4730d035981c32b4ddb48e5e919b0396b6d93
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317578
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-18 13:46:17 +00:00

12 lines
434 B
Plaintext

// OK
const int a = 1; enum class A { x = a };
enum class B { x = 1 };
// Disallowed
enum class C { x = 0.5 };
enum class D { x = float(1) };
enum class E { x = 1.0 };
uniform float f; enum class F { x = f };
const float g = 1.0; enum class G { x = g };
uniform int h; enum class H { x = h };