tint: Remove Program|ProgramBuilder::FriendlyName()

Now that we don't need the symbol table to get the names of the types, we can just call FriendlyName() on the type directly.

Change-Id: I39478f5b8847ee032e77c15fd0de0665ddbf4811
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130220
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton
2023-05-03 16:26:40 +00:00
committed by Dawn LUCI CQ
parent 6ac51c1c57
commit 1545ca191b
18 changed files with 43 additions and 101 deletions

View File

@@ -45,15 +45,15 @@ using TestParamHelper = TestHelperBase<testing::TestWithParam<T>>;
} // namespace tint::type
/// Helper macro for testing that a type was as expected
#define EXPECT_TYPE(GOT, EXPECT) \
do { \
const type::Type* got = GOT; \
const type::Type* expect = EXPECT; \
if (got != expect) { \
ADD_FAILURE() << #GOT " != " #EXPECT "\n" \
<< " " #GOT ": " << FriendlyName(got) << "\n" \
<< " " #EXPECT ": " << FriendlyName(expect); \
} \
#define EXPECT_TYPE(GOT, EXPECT) \
do { \
const type::Type* got = GOT; \
const type::Type* expect = EXPECT; \
if (got != expect) { \
ADD_FAILURE() << #GOT " != " #EXPECT "\n" \
<< " " #GOT ": " << (got ? got->FriendlyName() : "<null>") << "\n" \
<< " " #EXPECT ": " << (expect ? expect->FriendlyName() : "<null>"); \
} \
} while (false)
#endif // SRC_TINT_TYPE_TEST_HELPER_H_