| commit | baca71db9a972a7d17eac0501da9c6610a5b3b7e | [log] [tgz] |
|---|---|---|
| author | Dan Sinclair <dsinclair@google.com> | Mon Mar 16 13:47:24 2020 +0000 |
| committer | Sarah Mashayekhi <sarahmashay@google.com> | Mon Mar 16 13:47:24 2020 +0000 |
| tree | b00dcb19687f36ca2eedebddf66e8f7fa76cb551 | |
| parent | ce6f648b9b21e03341211e327fa872dd15467413 [diff] |
Add LocationDecoration ToStr test. Bug: tint:11 Change-Id: I8327d2f3961e4d8d74c6339b66ba36218126e63e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16562 Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
diff --git a/src/ast/kill_statement_test.cc b/src/ast/kill_statement_test.cc index 35e1b37..63115c7 100644 --- a/src/ast/kill_statement_test.cc +++ b/src/ast/kill_statement_test.cc
@@ -55,4 +55,3 @@ } // namespace ast } // namespace tint -
diff --git a/src/ast/location_decoration_test.cc b/src/ast/location_decoration_test.cc index 7858193..c68253a 100644 --- a/src/ast/location_decoration_test.cc +++ b/src/ast/location_decoration_test.cc
@@ -14,6 +14,8 @@ #include "src/ast/location_decoration.h" +#include <sstream> + #include "gtest/gtest.h" namespace tint { @@ -34,5 +36,13 @@ EXPECT_FALSE(d.IsSet()); } +TEST_F(LocationDecorationTest, ToStr) { + LocationDecoration d{2}; + std::ostringstream out; + d.to_str(out); + EXPECT_EQ(out.str(), R"(LocationDecoration{2} +)"); +} + } // namespace ast } // namespace tint