Add binding decoration to string test

This CL adds a test for the binding decoration to_str method.

Bug: tint:11
Change-Id: Id9d16bdb68c4b68fb8bd67dae898f8b7a17ee6c9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16468
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This commit is contained in:
Dan Sinclair 2020-03-10 19:18:51 +00:00 committed by dan sinclair
parent 89b2aa1207
commit d70d07c5b9
1 changed files with 8 additions and 0 deletions

View File

@ -34,5 +34,13 @@ TEST_F(BindingDecorationTest, Is) {
EXPECT_FALSE(d.IsSet());
}
TEST_F(BindingDecorationTest, ToStr) {
BindingDecoration d{2};
std::ostringstream out;
d.to_str(out);
EXPECT_EQ(out.str(), R"(BindingDecoration{2}
)");
}
} // namespace ast
} // namespace tint