From 19e26f2fece81fb8eee2ede3623b96d38cf63f43 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 5 Mar 2020 16:35:25 +0000 Subject: [PATCH] Move build_module into an anonymous namespace This CL moves build_module into an anonymous namespace which fixes up a build warning about missing prototypes. Change-Id: I8b2f427e32e7851c24492099103565ab0119f4fa Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16503 Reviewed-by: Sarah Mashayekhi --- src/validator_impl_import_test.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/validator_impl_import_test.cc b/src/validator_impl_import_test.cc index 5b17e064ab..5eb1a68f96 100644 --- a/src/validator_impl_import_test.cc +++ b/src/validator_impl_import_test.cc @@ -12,14 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include + #include + #include "gtest/gtest.h" #include "src/reader/wgsl/parser.h" #include "src/validator_impl.h" namespace tint { - -using ValidatorImplTest = testing::Test; +namespace { ast::Module build_module(std::string data) { auto reader = std::make_unique( @@ -28,6 +30,10 @@ ast::Module build_module(std::string data) { return reader->module(); } +} // namespace + +using ValidatorImplTest = testing::Test; + TEST_F(ValidatorImplTest, Import) { std::string input = "import \"GLSL.std.450\" as glsl;"; auto module = build_module(input);