mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
tests: Use ProgramBuilder helpers where we can
A general code cleanup Change-Id: Ib251ca2d4b71f75736bdba8b4255965593a76c31 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48680 Auto-Submit: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
261642e4e3
commit
43073d8aa3
@@ -268,11 +268,11 @@ TEST_F(FunctionListTest, FindSymbolMissing) {
|
||||
TEST_F(FunctionListTest, FindSymbolStage) {
|
||||
auto* fs = Func("main", VariableList{}, ty.f32(), StatementList{},
|
||||
ast::DecorationList{
|
||||
create<ast::StageDecoration>(PipelineStage::kFragment),
|
||||
Stage(PipelineStage::kFragment),
|
||||
});
|
||||
auto* vs = Func("main", VariableList{}, ty.f32(), StatementList{},
|
||||
ast::DecorationList{
|
||||
create<ast::StageDecoration>(PipelineStage::kVertex),
|
||||
Stage(PipelineStage::kVertex),
|
||||
});
|
||||
FunctionList list;
|
||||
list.Add(fs);
|
||||
@@ -286,7 +286,7 @@ TEST_F(FunctionListTest, FindSymbolStageMissing) {
|
||||
FunctionList list;
|
||||
list.Add(Func("main", VariableList{}, ty.f32(), StatementList{},
|
||||
ast::DecorationList{
|
||||
create<ast::StageDecoration>(PipelineStage::kFragment),
|
||||
Stage(PipelineStage::kFragment),
|
||||
}));
|
||||
EXPECT_EQ(nullptr,
|
||||
list.Find(Symbols().Register("main"), PipelineStage::kVertex));
|
||||
@@ -296,7 +296,7 @@ TEST_F(FunctionListTest, HasStage) {
|
||||
FunctionList list;
|
||||
list.Add(Func("main", VariableList{}, ty.f32(), StatementList{},
|
||||
ast::DecorationList{
|
||||
create<ast::StageDecoration>(PipelineStage::kFragment),
|
||||
Stage(PipelineStage::kFragment),
|
||||
}));
|
||||
EXPECT_TRUE(list.HasStage(PipelineStage::kFragment));
|
||||
EXPECT_FALSE(list.HasStage(PipelineStage::kVertex));
|
||||
|
||||
Reference in New Issue
Block a user