From: Kimmo Hoikka Date: Wed, 7 Jan 2015 17:25:34 +0000 (+0000) Subject: remove incorrect unit test, most functionality already covered by public API tests... X-Git-Tag: dali_1.0.24~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F33283%2F1;p=platform%2Fcore%2Fuifw%2Fdali-core.git remove incorrect unit test, most functionality already covered by public API tests anyways Change-Id: I3f42cecb70e67cd7288524d3f5fd591903e667df --- diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp index de5dc60..57852d3 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-ResourceClient.cpp @@ -1010,73 +1010,6 @@ int UtcDaliInternalLoadShaderRequest01(void) END_TEST; } -int UtcDaliInternalLoadShaderRequest02(void) -{ - TestApplication application; - tet_infoline("Testing LoadShader() failure"); - testTicketObserver.Reset(); - - // Clear through all of the outstanding shader load requests from the default shader effect - std::vector< unsigned char > buffer; - for( int i=0; i<10; i++ ) - { - buffer.push_back((unsigned char)i); - } - application.GetPlatform().SetLoadFileResult( true, buffer ); - application.GetGlAbstraction().SetLinkStatus(1); - application.SendNotification(); // Flush update messages - application.Render(); // Process load shader request (immediately) - application.SendNotification(); - application.Render(); - application.SendNotification(); - application.Render(); - application.SendNotification(); - - Internal::ResourceClient& resourceClient = Internal::ThreadLocalStorage::Get().GetResourceClient(); - Internal::SceneGraph::UpdateManager& updateManager = Internal::ThreadLocalStorage::Get().GetUpdateManager(); - - Integration::ShaderResourceType shaderRequest(123, "vertex src", "frag src"); - std::string shaderBinaryFile("shader.bin"); - Internal::ResourceTicketPtr ticket = resourceClient.LoadShader(shaderRequest, shaderBinaryFile); - ticket->AddObserver(testTicketObserver); - - ShaderEffect::GeometryHints hints = ShaderEffect::HINT_NONE; - Internal::SceneGraph::Shader* sceneObject = new Internal::SceneGraph::Shader( hints ); - AddShaderMessage( updateManager, *sceneObject ); - - size_t shaderHash=0; - SetShaderProgramMessage( updateManager, *sceneObject, GEOMETRY_TYPE_IMAGE, Internal::SHADER_DEFAULT, ticket->GetId(), shaderHash, true ); - - DALI_TEST_CHECK( ticket ); - - buffer.clear(); - DALI_TEST_CHECK(buffer.size() == 0); - - application.GetPlatform().SetLoadFileResult( true, buffer ); - application.GetGlAbstraction().ResetShaderCallStack(); - application.GetGlAbstraction().EnableShaderCallTrace( true ); - application.GetGlAbstraction().SetLinkStatus(1); - application.GetGlAbstraction().SetProgramBinaryLength(20); - application.GetPlatform().SetResourceSaved (ticket->GetId(), Integration::ResourceShader ); - - application.SendNotification(); // Flush update messages - application.Render(); // Process load shader request (immediately), add responses - // to post process q - application.Render(); // this update will process old post-process-q - application.Render(); // this update will process new post-process-q - application.SendNotification(); // Send save request to event thread - application.Render(); // this update will process save request - application.Render(); // this update will get SaveComplete - application.SendNotification(); // Send save request response - - TraceCallStack& shaderTrace = application.GetGlAbstraction().GetShaderTrace(); - DALI_TEST_CHECK( shaderTrace.FindMethod("CompileShader") ); - - DALI_TEST_CHECK( application.GetPlatform().WasCalled(TestPlatformAbstraction::SaveResourceFunc ) ); - DALI_TEST_CHECK( testTicketObserver.SaveSucceededCalled() ); - END_TEST; -} - int UtcDaliInternalAllocateBitmapImage01(void) { TestApplication application;