tint/resolver: fix diagnostic source for test
As spotted in https://dawn-review.googlesource.com/c/dawn/+/105640/comment/c79d61a2_ec2d879f. Change-Id: I1fda26d9050bd2a8f43e94ebcba32440f2f748f5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105940 Commit-Queue: Ben Clayton <bclayton@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
72ac53e5fa
commit
99084a411d
|
@ -735,12 +735,13 @@ TEST_F(StructMemberAttributeTest, Align_Attribute_Var) {
|
||||||
TEST_F(StructMemberAttributeTest, Align_Attribute_Override) {
|
TEST_F(StructMemberAttributeTest, Align_Attribute_Override) {
|
||||||
Override("val", ty.f32(), Expr(1.23_f));
|
Override("val", ty.f32(), Expr(1.23_f));
|
||||||
|
|
||||||
Structure("mystruct", utils::Vector{Member(
|
Structure("mystruct",
|
||||||
"a", ty.f32(), utils::Vector{MemberAlign(Source{{12, 34}}, "val")})});
|
utils::Vector{Member("a", ty.f32(),
|
||||||
|
utils::Vector{MemberAlign(Expr(Source{{12, 34}}, "val"))})});
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(
|
EXPECT_EQ(
|
||||||
r()->error(),
|
r()->error(),
|
||||||
R"(error: @align requires a const-expression, but expression is an override-expression)");
|
R"(12:34 error: @align requires a const-expression, but expression is an override-expression)");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(StructMemberAttributeTest, Size_Attribute_Const) {
|
TEST_F(StructMemberAttributeTest, Size_Attribute_Const) {
|
||||||
|
|
Loading…
Reference in New Issue