DRW: Tests: Add test for PassSimple::Sub

This commit is contained in:
Clément Foucault
2023-01-18 14:31:54 +01:00
parent e6be3f96d8
commit df74a9b624

View File

@@ -163,6 +163,9 @@ static void test_draw_pass_simple_draw()
pass.draw_procedural(GPU_PRIM_POINTS, 6, 60, 6, {5});
pass.draw_procedural(GPU_PRIM_TRIS, 3, 70, 7, {6});
PassSimple::Sub &sub = pass.sub("sub");
sub.draw_procedural(GPU_PRIM_TRIS, 3, 80, 8, {8});
std::string result = pass.serialize();
std::stringstream expected;
expected << ".test.simple_draw" << std::endl;
@@ -174,6 +177,8 @@ static void test_draw_pass_simple_draw()
expected << " .draw(inst_len=1, vert_len=50, vert_first=5, res_id=5)" << std::endl;
expected << " .draw(inst_len=6, vert_len=60, vert_first=6, res_id=5)" << std::endl;
expected << " .draw(inst_len=3, vert_len=70, vert_first=7, res_id=6)" << std::endl;
expected << " .sub" << std::endl;
expected << " .draw(inst_len=3, vert_len=80, vert_first=8, res_id=8)" << std::endl;
EXPECT_EQ(result, expected.str());