mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
Fill in some disabled tests
This CL completes a few of the DISABLED tests. Change-Id: I38806fb9381240d6e3da700f1fb2dac5f899ca6d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19000 Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
@@ -39,6 +39,9 @@ class Generator : public writer::Writer {
|
||||
/// @returns the result data
|
||||
std::string result() const { return impl_.result(); }
|
||||
|
||||
/// @returns the error
|
||||
std::string error() const { return impl_.error(); }
|
||||
|
||||
private:
|
||||
GeneratorImpl impl_;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,17 @@ namespace {
|
||||
|
||||
using GeneratorImplTest = testing::Test;
|
||||
|
||||
TEST_F(GeneratorImplTest, DISABLED_Generate) {}
|
||||
TEST_F(GeneratorImplTest, Generate) {
|
||||
ast::Module m;
|
||||
m.AddImport(std::make_unique<ast::Import>("GLSL.std.430", "a"));
|
||||
|
||||
GeneratorImpl g;
|
||||
|
||||
ASSERT_TRUE(g.Generate(m)) << g.error();
|
||||
EXPECT_EQ(g.result(), R"(import "GLSL.std.430" as a;
|
||||
|
||||
)");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace wgsl
|
||||
|
||||
Reference in New Issue
Block a user