MCPcopy Create free account
hub / github.com/defold/defold / TEST_P

Function TEST_P

engine/engine/src/test/test_engine.cpp:465–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463/* Draw Count */
464
465TEST_P(DrawCountTest, DrawCount)
466{
467 const DrawCountParams& p = GetParam();
468 char project_path[512];
469 MAKE_PATH(project_path, p.m_ProjectPath);
470
471 const char* argv[] = {"dmengine", "--config=script.shared_state=1", "--config=dmengine.unload_builtins=0", "--config=display.update_frequency=0", "--config=bootstrap.main_collection=/render/drawcall.collectionc", project_path};
472
473 ASSERT_TRUE(dmEngine::Init(m_Engine, DM_ARRAY_SIZE(argv), (char**)argv));
474
475 for( int i = 0; i < p.m_NumSkipFrames; ++i )
476 {
477 dmEngine::Step(m_Engine);
478 }
479
480 dmEngine::Step(m_Engine);
481
482#ifdef DM_PLATFORM_WINDOWS
483 // TODO:
484 // For whatever reason, CI occasionally fails this test because
485 // draw count is 1 and not 2. Until we have time to dig deeper into why,
486 // we will do this workaround for now.
487 ASSERT_NE(0, dmGraphics::GetDrawCount());
488#else
489 ASSERT_EQ(p.m_ExpectedDrawCount, dmGraphics::GetDrawCount());
490#endif
491}
492
493DrawCountParams draw_count_params[] =
494{

Callers

nothing calls this directly

Calls 3

GetDrawCountFunction · 0.85
InitFunction · 0.50
StepFunction · 0.50

Tested by

no test coverage detected