Fixed internal material test cases 50/28150/1
authorDavid Steele <david.steele@partner.samsung.com>
Fri, 26 Sep 2014 17:17:21 +0000 (18:17 +0100)
committerDavid Steele <david.steele@partner.samsung.com>
Fri, 26 Sep 2014 17:17:21 +0000 (18:17 +0100)
[problem] Test cases rely on shader loading being immediate
[cause] Shader loading has changed to lazy load, context
relies on GlContextCreated() being called.
[solution] Fixup test setup.

Change-Id: I28c5f86873949b821386b941e26228775bb4d5ab
Signed-off-by: David Steele <david.steele@partner.samsung.com>
automated-tests/src/dali-internal/utc-Dali-Internal-Material.cpp

index b4d8b85381ee9b94270935b123f3681b064206c2..01190b579b45d90f2b8e02efedd957e76b69a2ae 100644 (file)
@@ -76,13 +76,15 @@ public:
   : app(application)
   {
     Internal::Context* testContext = new Internal::Context( application.GetGlAbstraction() );
+    testContext->GlContextCreated();
+
     Integration::ShaderDataPtr shaderData = new Integration::ShaderData("123", "132");
     shaderData->AllocateBuffer(10);
 
     Integration::ResourceId resourceId = 100;
     program = Internal::Program::New(resourceId, shaderData.Get(), *testContext, true);
+    program->Use(); // Ensure program lazy loading is forced to load program.
     programId = app.GetGlAbstraction().GetLastProgramCreated();
-    program->Use();
   }
 
   virtual ~TestProgram()