From ba903808e255446af0067a8ffd8978c9ff1f11c1 Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Wed, 7 Jan 2015 17:25:34 +0000 Subject: [PATCH] remove incorrect unit test, most functionality already covered by public API tests anyways Change-Id: I3f42cecb70e67cd7288524d3f5fd591903e667df --- .../utc-Dali-Internal-ResourceClient.cpp | 67 ---------------------- 1 file changed, 67 deletions(-) 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; -- 2.7.4