mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-07 13:45:51 +00:00
Remove assert in test.
The `assert` will compile out in Release builds so we don't actually parse the module, which means we're always testing against an empty module and the tests fail. Bug: tint:22 Change-Id: I49a1f8fc8ec6231a65f4f17e385cff576c4f0d06 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/17204 Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
881cdede29
commit
3040f618a5
@ -12,8 +12,6 @@
|
|||||||
// 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"
|
||||||
@ -26,12 +24,10 @@ namespace {
|
|||||||
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>(
|
||||||
std::string(data.begin(), data.end()));
|
std::string(data.begin(), data.end()));
|
||||||
assert(reader->Parse());
|
EXPECT_TRUE(reader->Parse()) << reader->error();
|
||||||
return reader->module();
|
return reader->module();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
using ValidatorImplTest = testing::Test;
|
using ValidatorImplTest = testing::Test;
|
||||||
|
|
||||||
TEST_F(ValidatorImplTest, Import) {
|
TEST_F(ValidatorImplTest, Import) {
|
||||||
@ -59,4 +55,5 @@ TEST_F(ValidatorImplTest, Import_Fail_Typo) {
|
|||||||
EXPECT_EQ(v.error(), "1:1: v-0001: unknown import: GLSL.std.4501");
|
EXPECT_EQ(v.error(), "1:1: v-0001: unknown import: GLSL.std.4501");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
} // namespace tint
|
} // namespace tint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user