Skip to content

Commit 58de15a

Browse files
committed
tests: tolerate wrapped constexpr diagnostics
Split FileCheck patterns into smaller tokens so messages match across line-wrapping variants.
1 parent becad16 commit 58de15a

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

tests/lit-tests/constexpr-aggregate-errors.ispc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@ constexpr uniform int<2> bad_swizzle_char = v2.qy;
1414
constexpr uniform int<2> bad_swizzle_oob = v2.zw;
1515

1616
// CHECK: Error:
17-
// CHECK: Initializer list for array
17+
// CHECK: Initializer list
18+
// CHECK: for array
1819
// CHECK: "const uniform int32[2]"
1920
// CHECK: must have
2021
// CHECK: no more
21-
// CHECK: than 2 elements (has 3).
22+
// CHECK: than 2
23+
// CHECK: elements
24+
// CHECK: (has 3).
2225
// CHECK: Error:
23-
// CHECK: Initializer list for struct
26+
// CHECK: Initializer list
27+
// CHECK: for struct
2428
// CHECK: "const uniform struct Pair"
2529
// CHECK: must
2630
// CHECK: have no
27-
// CHECK: more than 2 elements (has 3).
31+
// CHECK: more than 2
32+
// CHECK: elements
33+
// CHECK: (has 3).
2834
// CHECK: identifier "qy" unknown.
2935
// CHECK: character 'z' for constexpr vector.

tests/lit-tests/constexpr-errors.ispc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@ constexpr uniform int badstmt(uniform int x) {
1515

1616
// CHECK: Error:
1717
// CHECK: Initializer
18-
// CHECK: for global variable "badinit" must be a constant.
18+
// CHECK: for global
19+
// CHECK: variable "badinit" must be a constant.
1920
// CHECK: Error:
2021
// CHECK: Missing
21-
// CHECK: initializer for constexpr variable "noinit".
22+
// CHECK: initializer for
23+
// CHECK: constexpr variable "noinit".
2224
// CHECK: Error:
2325
// CHECK: constexpr
24-
// CHECK: function "badcall" calls non-constexpr function
26+
// CHECK: function
27+
// CHECK: "badcall" calls non-constexpr function
2528
// CHECK: "nonconstexpr".
2629
// CHECK: Error:
2730
// CHECK: constexpr
28-
// CHECK: function "badstmt" contains disallowed statement
31+
// CHECK: function
32+
// CHECK: "badstmt" contains disallowed statement
2933
// CHECK: "print".

0 commit comments

Comments
 (0)