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 <sarahmashay@google.com>
This commit is contained in:
dan sinclair 2020-03-05 16:35:25 +00:00 committed by dan sinclair
parent db6ade73b2
commit 19e26f2fec
1 changed files with 8 additions and 2 deletions

View File

@ -12,14 +12,16 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include <assert.h>
#include <iostream> #include <iostream>
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "src/reader/wgsl/parser.h" #include "src/reader/wgsl/parser.h"
#include "src/validator_impl.h" #include "src/validator_impl.h"
namespace tint { namespace tint {
namespace {
using ValidatorImplTest = testing::Test;
ast::Module build_module(std::string data) { ast::Module build_module(std::string data) {
auto reader = std::make_unique<tint::reader::wgsl::Parser>( auto reader = std::make_unique<tint::reader::wgsl::Parser>(
@ -28,6 +30,10 @@ ast::Module build_module(std::string data) {
return reader->module(); return reader->module();
} }
} // namespace
using ValidatorImplTest = testing::Test;
TEST_F(ValidatorImplTest, Import) { TEST_F(ValidatorImplTest, Import) {
std::string input = "import \"GLSL.std.450\" as glsl;"; std::string input = "import \"GLSL.std.450\" as glsl;";
auto module = build_module(input); auto module = build_module(input);