#include "src/tint/lang/wgsl/ast/transform/renamer.h"
#include <memory>
#include <unordered_set>
#include <vector>
#include "gmock/gmock.h"
#include "src/tint/lang/core/builtin_type.h"
#include "src/tint/lang/core/texel_format.h"
#include "src/tint/lang/wgsl/ast/transform/helper_test.h"
#include "src/tint/utils/text/string.h"
namespace tint::ast::transform {
namespace {
constexpr const char kUnicodeIdentifier[] = …
"\xf0\x9d\x96\x8e\xf0\x9d\x96\x89\xf0\x9d\x96\x8a\xf0\x9d\x96\x93"
"\xf0\x9d\x96\x99\xf0\x9d\x96\x8e\xf0\x9d\x96\x8b\xf0\x9d\x96\x8e"
"\xf0\x9d\x96\x8a\xf0\x9d\x96\x97\x31\x32\x33";
ContainerEq;
RenamerTest;
TEST_F(RenamerTest, EmptyModule) { … }
TEST_F(RenamerTest, BasicModuleVertexIndex) { … }
TEST_F(RenamerTest, RequestedNames) { … }
TEST_F(RenamerTest, PreserveSwizzles) { … }
TEST_F(RenamerTest, PreserveSwizzles_ThroughMaterialize) { … }
TEST_F(RenamerTest, PreserveBuiltins) { … }
TEST_F(RenamerTest, PreserveBuiltinTypes) { … }
TEST_F(RenamerTest, PreserveBuiltinTypes_ViaPointerDot) { … }
TEST_F(RenamerTest, PreserveCoreDiagnosticRuleName) { … }
TEST_F(RenamerTest, PreserveUnicode) { … }
TEST_F(RenamerTest, PreserveUnicodeRenameAll) { … }
TEST_F(RenamerTest, AttemptSymbolCollision) { … }
TEST_F(RenamerTest, PreserveTexelFormatAndAccess) { … }
TEST_F(RenamerTest, PreserveAddressSpace) { … }
RenamerTestGlsl;
RenamerTestHlsl;
RenamerTestMsl;
TEST_P(RenamerTestGlsl, Keywords) { … }
TEST_P(RenamerTestHlsl, Keywords) { … }
TEST_P(RenamerTestMsl, Keywords) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
std::string ExpandBuiltinType(std::string_view name) { … }
std::vector<std::string_view> ConstructableTypes() { … }
RenamerBuiltinTypeTest;
TEST_P(RenamerBuiltinTypeTest, PreserveTypeUsage) { … }
TEST_P(RenamerBuiltinTypeTest, PreserveTypeInitializer) { … }
TEST_P(RenamerBuiltinTypeTest, PreserveTypeConversion) { … }
TEST_F(RenamerBuiltinTypeTest, PreserveTypeExpression) { … }
TEST_P(RenamerBuiltinTypeTest, RenameShadowedByAlias) { … }
TEST_P(RenamerBuiltinTypeTest, RenameShadowedByStruct) { … }
INSTANTIATE_TEST_SUITE_P(…);
std::vector<std::string_view> Identifiers() { … }
RenamerBuiltinIdentifierTest;
TEST_P(RenamerBuiltinIdentifierTest, GlobalConstName) { … }
TEST_P(RenamerBuiltinIdentifierTest, LocalVarName) { … }
TEST_P(RenamerBuiltinIdentifierTest, FunctionName) { … }
TEST_P(RenamerBuiltinIdentifierTest, StructName) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}