Add SetDecoration to_str test

This CL adds a test for the set decorations to_str method.

Bug: tint:11
Change-Id: I06396c1bf59c90aad6a6851cf9695fbee42546a8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16669
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This commit is contained in:
Dan Sinclair 2020-03-17 03:51:55 +00:00 committed by Sarah Mashayekhi
parent 7267a851bf
commit 0cef04193d
1 changed files with 8 additions and 0 deletions

View File

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