Add builtin decoration to_str test.

This CL adds a test for the to_str method of the BuiltinDecoration.

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

View File

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