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>
This commit is contained in:
parent
ce6f648b9b
commit
baca71db9a
|
@ -55,4 +55,3 @@ TEST_F(KillStatementTest, ToStr) {
|
||||||
|
|
||||||
} // namespace ast
|
} // namespace ast
|
||||||
} // namespace tint
|
} // namespace tint
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
#include "src/ast/location_decoration.h"
|
#include "src/ast/location_decoration.h"
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
namespace tint {
|
namespace tint {
|
||||||
|
@ -34,5 +36,13 @@ TEST_F(LocationDecorationTest, Is) {
|
||||||
EXPECT_FALSE(d.IsSet());
|
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 ast
|
||||||
} // namespace tint
|
} // namespace tint
|
||||||
|
|
Loading…
Reference in New Issue