transform: Rename BoundArrayAccessors to Robustness
We will want this transform to do more bounds and argument sanitization.
Bug: tint:748
Change-Id: I38cb9623622e9f5ab85d8cd420d669ca6be77099
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56543
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/fuzzers/BUILD.gn b/fuzzers/BUILD.gn
index 2f6eae5..64eefc8 100644
--- a/fuzzers/BUILD.gn
+++ b/fuzzers/BUILD.gn
@@ -66,11 +66,6 @@
deps = [ ":tint_fuzzer_common" ]
}
- fuzzer_test("tint_bound_array_accessors_fuzzer") {
- sources = [ "tint_bound_array_accessors_fuzzer.cc" ]
- deps = [ ":tint_fuzzer_common" ]
- }
-
fuzzer_test("tint_first_index_offset_fuzzer") {
sources = [ "tint_first_index_offset_fuzzer.cc" ]
deps = [ ":tint_fuzzer_common" ]
@@ -86,6 +81,11 @@
deps = [ ":tint_fuzzer_common" ]
}
+ fuzzer_test("tint_robustness_fuzzer") {
+ sources = [ "tint_robustness_fuzzer.cc" ]
+ deps = [ ":tint_fuzzer_common" ]
+ }
+
fuzzer_test("tint_single_entry_point_fuzzer") {
sources = [ "tint_single_entry_point_fuzzer.cc" ]
deps = [ ":tint_fuzzer_common" ]
@@ -187,7 +187,7 @@
deps += [
":tint_all_transforms_fuzzer",
":tint_binding_remapper_fuzzer",
- ":tint_bound_array_accessors_fuzzer",
+ ":tint_robustness_fuzzer",
":tint_first_index_offset_fuzzer",
":tint_inspector_fuzzer",
":tint_renamer_fuzzer",
diff --git a/fuzzers/CMakeLists.txt b/fuzzers/CMakeLists.txt
index 8588b45..ccaae93 100644
--- a/fuzzers/CMakeLists.txt
+++ b/fuzzers/CMakeLists.txt
@@ -32,10 +32,10 @@
if (${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_SPV_WRITER})
add_tint_fuzzer(tint_all_transforms_fuzzer)
add_tint_fuzzer(tint_binding_remapper_fuzzer)
- add_tint_fuzzer(tint_bound_array_accessors_fuzzer)
add_tint_fuzzer(tint_first_index_offset_fuzzer)
add_tint_fuzzer(tint_inspector_fuzzer)
add_tint_fuzzer(tint_renamer_fuzzer)
+ add_tint_fuzzer(tint_robustness_fuzzer)
add_tint_fuzzer(tint_single_entry_point_fuzzer)
add_tint_fuzzer(tint_spirv_transform_fuzzer)
add_tint_fuzzer(tint_vertex_pulling_fuzzer)
diff --git a/fuzzers/tint_all_transforms_fuzzer.cc b/fuzzers/tint_all_transforms_fuzzer.cc
index 9e2dc50..dfdf4de 100644
--- a/fuzzers/tint_all_transforms_fuzzer.cc
+++ b/fuzzers/tint_all_transforms_fuzzer.cc
@@ -30,7 +30,7 @@
ExtractSingleEntryPointInputs(&config->reader, &config->inputs);
ExtractVertexPullingInputs(&config->reader, &config->inputs);
- config->manager.Add<transform::BoundArrayAccessors>();
+ config->manager.Add<transform::Robustness>();
config->manager.Add<transform::FirstIndexOffset>();
config->manager.Add<transform::BindingRemapper>();
config->manager.Add<transform::Renamer>();
diff --git a/fuzzers/tint_bound_array_accessors_fuzzer.cc b/fuzzers/tint_robustness_fuzzer.cc
similarity index 93%
rename from fuzzers/tint_bound_array_accessors_fuzzer.cc
rename to fuzzers/tint_robustness_fuzzer.cc
index 2040320..a763c29 100644
--- a/fuzzers/tint_bound_array_accessors_fuzzer.cc
+++ b/fuzzers/tint_robustness_fuzzer.cc
@@ -19,7 +19,7 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
tint::transform::Manager transform_manager;
- transform_manager.Add<tint::transform::BoundArrayAccessors>();
+ transform_manager.Add<tint::transform::Robustness>();
tint::fuzzers::CommonFuzzer fuzzer(InputFormat::kWGSL, OutputFormat::kSpv);
fuzzer.SetTransformManager(&transform_manager, {});
diff --git a/include/tint/tint.h b/include/tint/tint.h
index ff1991e..9a51bbe 100644
--- a/include/tint/tint.h
+++ b/include/tint/tint.h
@@ -25,10 +25,10 @@
#include "src/reader/reader.h"
#include "src/sem/type_manager.h"
#include "src/transform/binding_remapper.h"
-#include "src/transform/bound_array_accessors.h"
#include "src/transform/first_index_offset.h"
#include "src/transform/manager.h"
#include "src/transform/renamer.h"
+#include "src/transform/robustness.h"
#include "src/transform/single_entry_point.h"
#include "src/transform/vertex_pulling.h"
#include "src/writer/writer.h"
diff --git a/samples/main.cc b/samples/main.cc
index 3ad5aa8..e80d9f4 100644
--- a/samples/main.cc
+++ b/samples/main.cc
@@ -87,9 +87,9 @@
-o <name> -- Output file name. Use "-" for standard output
--transform <name list> -- Runs transforms, name list is comma separated
Available transforms:
- bound_array_accessors
first_index_offset
renamer
+ robustness
--parse-only -- Stop after parsing the input
--dump-ast -- Dump the generated AST to stdout
--demangle -- Preserve original source names. Demangle them.
@@ -704,14 +704,14 @@
// be run that needs user input. Should we find a way to support that here
// maybe through a provided file?
- if (name == "bound_array_accessors") {
- transform_manager.Add<tint::transform::BoundArrayAccessors>();
- } else if (name == "first_index_offset") {
+ if (name == "first_index_offset") {
transform_inputs.Add<tint::transform::FirstIndexOffset::BindingPoint>(0,
0);
transform_manager.Add<tint::transform::FirstIndexOffset>();
} else if (name == "renamer") {
transform_manager.Add<tint::transform::Renamer>();
+ } else if (name == "robustness") {
+ transform_manager.Add<tint::transform::Robustness>();
} else {
std::cerr << "Unknown transform name: " << name << std::endl;
return 1;
diff --git a/src/BUILD.gn b/src/BUILD.gn
index f838efb..5b1a3d5 100644
--- a/src/BUILD.gn
+++ b/src/BUILD.gn
@@ -554,8 +554,6 @@
"transform/array_length_from_uniform.h",
"transform/binding_remapper.cc",
"transform/binding_remapper.h",
- "transform/bound_array_accessors.cc",
- "transform/bound_array_accessors.h",
"transform/calculate_array_length.cc",
"transform/calculate_array_length.h",
"transform/canonicalize_entry_point_io.cc",
@@ -578,6 +576,8 @@
"transform/promote_initializers_to_const_var.h",
"transform/renamer.cc",
"transform/renamer.h",
+ "transform/robustness.cc",
+ "transform/robustness.h",
"transform/simplify.cc",
"transform/simplify.h",
"transform/single_entry_point.cc",
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c808b43..914e198 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -279,8 +279,6 @@
transform/array_length_from_uniform.h
transform/binding_remapper.cc
transform/binding_remapper.h
- transform/bound_array_accessors.cc
- transform/bound_array_accessors.h
transform/calculate_array_length.cc
transform/calculate_array_length.h
transform/canonicalize_entry_point_io.cc
@@ -303,6 +301,8 @@
transform/promote_initializers_to_const_var.h
transform/renamer.cc
transform/renamer.h
+ transform/robustness.cc
+ transform/robustness.h
transform/simplify.cc
transform/simplify.h
transform/single_entry_point.cc
@@ -866,7 +866,6 @@
list(APPEND TINT_TEST_SRCS
transform/array_length_from_uniform_test.cc
transform/binding_remapper_test.cc
- transform/bound_array_accessors_test.cc
transform/calculate_array_length_test.cc
transform/canonicalize_entry_point_io_test.cc
transform/decompose_memory_access_test.cc
@@ -877,6 +876,7 @@
transform/pad_array_elements_test.cc
transform/promote_initializers_to_const_var_test.cc
transform/renamer_test.cc
+ transform/robustness_test.cc
transform/simplify_test.cc
transform/single_entry_point_test.cc
transform/test_helper.h
diff --git a/src/transform/bound_array_accessors.cc b/src/transform/robustness.cc
similarity index 89%
rename from src/transform/bound_array_accessors.cc
rename to src/transform/robustness.cc
index 5ad5020..e59ea5d 100644
--- a/src/transform/bound_array_accessors.cc
+++ b/src/transform/robustness.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/transform/bound_array_accessors.h"
+#include "src/transform/robustness.h"
#include <algorithm>
#include <utility>
@@ -20,15 +20,15 @@
#include "src/program_builder.h"
#include "src/sem/expression.h"
-TINT_INSTANTIATE_TYPEINFO(tint::transform::BoundArrayAccessors);
+TINT_INSTANTIATE_TYPEINFO(tint::transform::Robustness);
namespace tint {
namespace transform {
-BoundArrayAccessors::BoundArrayAccessors() = default;
-BoundArrayAccessors::~BoundArrayAccessors() = default;
+Robustness::Robustness() = default;
+Robustness::~Robustness() = default;
-void BoundArrayAccessors::Run(CloneContext& ctx, const DataMap&, DataMap&) {
+void Robustness::Run(CloneContext& ctx, const DataMap&, DataMap&) {
ctx.ReplaceAll([&](ast::ArrayAccessorExpression* expr) {
return Transform(expr, &ctx);
});
@@ -36,7 +36,7 @@
ctx.Clone();
}
-ast::ArrayAccessorExpression* BoundArrayAccessors::Transform(
+ast::ArrayAccessorExpression* Robustness::Transform(
ast::ArrayAccessorExpression* expr,
CloneContext* ctx) {
auto& diags = ctx->dst->Diagnostics();
diff --git a/src/transform/bound_array_accessors.h b/src/transform/robustness.h
similarity index 85%
rename from src/transform/bound_array_accessors.h
rename to src/transform/robustness.h
index 87803e6..b489d07 100644
--- a/src/transform/bound_array_accessors.h
+++ b/src/transform/robustness.h
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef SRC_TRANSFORM_BOUND_ARRAY_ACCESSORS_H_
-#define SRC_TRANSFORM_BOUND_ARRAY_ACCESSORS_H_
+#ifndef SRC_TRANSFORM_ROBUSTNESS_H_
+#define SRC_TRANSFORM_ROBUSTNESS_H_
#include "src/ast/array_accessor_expression.h"
#include "src/transform/transform.h"
@@ -25,12 +25,12 @@
/// the bounds of the array. Any access before the start of the array will clamp
/// to zero and any access past the end of the array will clamp to
/// (array length - 1).
-class BoundArrayAccessors : public Castable<BoundArrayAccessors, Transform> {
+class Robustness : public Castable<Robustness, Transform> {
public:
/// Constructor
- BoundArrayAccessors();
+ Robustness();
/// Destructor
- ~BoundArrayAccessors() override;
+ ~Robustness() override;
protected:
/// Runs the transform using the CloneContext built for transforming a
@@ -46,7 +46,9 @@
CloneContext* ctx);
};
+using BoundArrayAccessors = Robustness;
+
} // namespace transform
} // namespace tint
-#endif // SRC_TRANSFORM_BOUND_ARRAY_ACCESSORS_H_
+#endif // SRC_TRANSFORM_ROBUSTNESS_H_
diff --git a/src/transform/bound_array_accessors_test.cc b/src/transform/robustness_test.cc
similarity index 74%
rename from src/transform/bound_array_accessors_test.cc
rename to src/transform/robustness_test.cc
index f8b8f89..18ac30b 100644
--- a/src/transform/bound_array_accessors_test.cc
+++ b/src/transform/robustness_test.cc
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "src/transform/bound_array_accessors.h"
+#include "src/transform/robustness.h"
#include "src/transform/test_helper.h"
@@ -20,9 +20,9 @@
namespace transform {
namespace {
-using BoundArrayAccessorsTest = TransformTest;
+using RobustnessTest = TransformTest;
-TEST_F(BoundArrayAccessorsTest, Ptrs_Clamp) {
+TEST_F(RobustnessTest, Ptrs_Clamp) {
auto* src = R"(
var<private> a : array<f32, 3>;
@@ -43,12 +43,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Array_Idx_Nested_Scalar) {
+TEST_F(RobustnessTest, Array_Idx_Nested_Scalar) {
auto* src = R"(
var<private> a : array<f32, 3>;
@@ -73,12 +73,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Array_Idx_Scalar) {
+TEST_F(RobustnessTest, Array_Idx_Scalar) {
auto* src = R"(
var<private> a : array<f32, 3>;
@@ -95,12 +95,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Array_Idx_Expr) {
+TEST_F(RobustnessTest, Array_Idx_Expr) {
auto* src = R"(
var<private> a : array<f32, 3>;
@@ -121,12 +121,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Array_Idx_Negative) {
+TEST_F(RobustnessTest, Array_Idx_Negative) {
auto* src = R"(
var<private> a : array<f32, 3>;
@@ -143,12 +143,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Array_Idx_OutOfBounds) {
+TEST_F(RobustnessTest, Array_Idx_OutOfBounds) {
auto* src = R"(
var<private> a : array<f32, 3>;
@@ -165,12 +165,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Vector_Idx_Scalar) {
+TEST_F(RobustnessTest, Vector_Idx_Scalar) {
auto* src = R"(
var<private> a : vec3<f32>;
@@ -187,12 +187,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Vector_Idx_Expr) {
+TEST_F(RobustnessTest, Vector_Idx_Expr) {
auto* src = R"(
var<private> a : vec3<f32>;
@@ -213,12 +213,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Vector_Swizzle_Idx_Scalar) {
+TEST_F(RobustnessTest, Vector_Swizzle_Idx_Scalar) {
auto* src = R"(
var<private> a : vec3<f32>;
@@ -235,12 +235,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Vector_Swizzle_Idx_Var) {
+TEST_F(RobustnessTest, Vector_Swizzle_Idx_Var) {
auto* src = R"(
var<private> a : vec3<f32>;
@@ -261,11 +261,11 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Vector_Swizzle_Idx_Expr) {
+TEST_F(RobustnessTest, Vector_Swizzle_Idx_Expr) {
auto* src = R"(
var<private> a : vec3<f32>;
@@ -286,12 +286,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Vector_Idx_Negative) {
+TEST_F(RobustnessTest, Vector_Idx_Negative) {
auto* src = R"(
var<private> a : vec3<f32>;
@@ -308,12 +308,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Vector_Idx_OutOfBounds) {
+TEST_F(RobustnessTest, Vector_Idx_OutOfBounds) {
auto* src = R"(
var<private> a : vec3<f32>;
@@ -330,12 +330,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Matrix_Idx_Scalar) {
+TEST_F(RobustnessTest, Matrix_Idx_Scalar) {
auto* src = R"(
var<private> a : mat3x2<f32>;
@@ -352,12 +352,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Matrix_Idx_Expr_Column) {
+TEST_F(RobustnessTest, Matrix_Idx_Expr_Column) {
auto* src = R"(
var<private> a : mat3x2<f32>;
@@ -378,12 +378,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Matrix_Idx_Expr_Row) {
+TEST_F(RobustnessTest, Matrix_Idx_Expr_Row) {
auto* src = R"(
var<private> a : mat3x2<f32>;
@@ -404,12 +404,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Matrix_Idx_Negative_Column) {
+TEST_F(RobustnessTest, Matrix_Idx_Negative_Column) {
auto* src = R"(
var<private> a : mat3x2<f32>;
@@ -426,12 +426,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Matrix_Idx_Negative_Row) {
+TEST_F(RobustnessTest, Matrix_Idx_Negative_Row) {
auto* src = R"(
var<private> a : mat3x2<f32>;
@@ -448,12 +448,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Matrix_Idx_OutOfBounds_Column) {
+TEST_F(RobustnessTest, Matrix_Idx_OutOfBounds_Column) {
auto* src = R"(
var<private> a : mat3x2<f32>;
@@ -470,12 +470,12 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
-TEST_F(BoundArrayAccessorsTest, Matrix_Idx_OutOfBounds_Row) {
+TEST_F(RobustnessTest, Matrix_Idx_OutOfBounds_Row) {
auto* src = R"(
var<private> a : mat3x2<f32>;
@@ -492,13 +492,13 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
// TODO(dsinclair): Implement when constant_id exists
-TEST_F(BoundArrayAccessorsTest, DISABLED_Vector_Constant_Id_Clamps) {
+TEST_F(RobustnessTest, DISABLED_Vector_Constant_Id_Clamps) {
// [[override(1300)]] let idx : i32;
// var a : vec3<f32>
// var b : f32 = a[idx]
@@ -507,7 +507,7 @@
}
// TODO(dsinclair): Implement when constant_id exists
-TEST_F(BoundArrayAccessorsTest, DISABLED_Array_Constant_Id_Clamps) {
+TEST_F(RobustnessTest, DISABLED_Array_Constant_Id_Clamps) {
// [[override(1300)]] let idx : i32;
// var a : array<f32, 4>
// var b : f32 = a[idx]
@@ -516,7 +516,7 @@
}
// TODO(dsinclair): Implement when constant_id exists
-TEST_F(BoundArrayAccessorsTest, DISABLED_Matrix_Column_Constant_Id_Clamps) {
+TEST_F(RobustnessTest, DISABLED_Matrix_Column_Constant_Id_Clamps) {
// [[override(1300)]] let idx : i32;
// var a : mat3x2<f32>
// var b : f32 = a[idx][1]
@@ -525,7 +525,7 @@
}
// TODO(dsinclair): Implement when constant_id exists
-TEST_F(BoundArrayAccessorsTest, DISABLED_Matrix_Row_Constant_Id_Clamps) {
+TEST_F(RobustnessTest, DISABLED_Matrix_Row_Constant_Id_Clamps) {
// [[override(1300)]] let idx : i32;
// var a : mat3x2<f32>
// var b : f32 = a[1][idx]
@@ -533,7 +533,7 @@
// -> var b : f32 = a[1][min(u32(idx), 0, 1)]
}
-TEST_F(BoundArrayAccessorsTest, RuntimeArray_Clamps) {
+TEST_F(RobustnessTest, RuntimeArray_Clamps) {
auto* src = R"(
[[block]]
struct S {
@@ -561,24 +561,24 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
// TODO(dsinclair): Clamp atomics when available.
-TEST_F(BoundArrayAccessorsTest, DISABLED_Atomics_Clamp) {
+TEST_F(RobustnessTest, DISABLED_Atomics_Clamp) {
FAIL();
}
// TODO(dsinclair): Clamp texture coord values. Depends on:
// https://github.com/gpuweb/gpuweb/issues/1107
-TEST_F(BoundArrayAccessorsTest, DISABLED_TextureCoord_Clamp) {
+TEST_F(RobustnessTest, DISABLED_TextureCoord_Clamp) {
FAIL();
}
// TODO(dsinclair): Test for scoped variables when Lexical Scopes implemented
-TEST_F(BoundArrayAccessorsTest, DISABLED_Scoped_Variable) {
+TEST_F(RobustnessTest, DISABLED_Scoped_Variable) {
// var a : array<f32, 3>;
// var i : u32;
// {
@@ -593,7 +593,7 @@
}
// Check that existing use of min() and arrayLength() do not get renamed.
-TEST_F(BoundArrayAccessorsTest, DontRenameSymbols) {
+TEST_F(RobustnessTest, DontRenameSymbols) {
auto* src = R"(
[[block]]
struct S {
@@ -630,7 +630,7 @@
}
)";
- auto got = Run<BoundArrayAccessors>(src);
+ auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
diff --git a/test/BUILD.gn b/test/BUILD.gn
index fba8220..dd4bcfc 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -278,7 +278,6 @@
"../src/traits_test.cc",
"../src/transform/array_length_from_uniform_test.cc",
"../src/transform/binding_remapper_test.cc",
- "../src/transform/bound_array_accessors_test.cc",
"../src/transform/calculate_array_length_test.cc",
"../src/transform/canonicalize_entry_point_io_test.cc",
"../src/transform/decompose_memory_access_test.cc",
@@ -288,6 +287,7 @@
"../src/transform/pad_array_elements_test.cc",
"../src/transform/promote_initializers_to_const_var_test.cc",
"../src/transform/renamer_test.cc",
+ "../src/transform/robustness_test.cc",
"../src/transform/simplify_test.cc",
"../src/transform/single_entry_point_test.cc",
"../src/transform/test_helper.h",