[Bf-blender-cvs] [41ce217d3ce] cycles-x: Fix compilation error of Cycles X unit test

Sergey Sharybin noreply at git.blender.org
Fri Sep 3 15:20:47 CEST 2021


Commit: 41ce217d3ce954164a672cb6bb99fd8f1291e83b
Author: Sergey Sharybin
Date:   Fri Sep 3 15:19:34 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB41ce217d3ce954164a672cb6bb99fd8f1291e83b

Fix compilation error of Cycles X unit test

Remove test of function which became non-public and which depends on
the scheduler state. Seems easiest solution, and the details of the
behavior perhaps better be tested on the scheduler level instead.

===================================================================

M	intern/cycles/integrator/render_scheduler.h
M	intern/cycles/test/integrator_render_scheduler_test.cpp

===================================================================

diff --git a/intern/cycles/integrator/render_scheduler.h b/intern/cycles/integrator/render_scheduler.h
index a2d92877f08..9ef6a0287bc 100644
--- a/intern/cycles/integrator/render_scheduler.h
+++ b/intern/cycles/integrator/render_scheduler.h
@@ -414,6 +414,7 @@ class RenderScheduler {
    * down by a factor of 4. */
   int calculate_resolution_divider_for_time(double desired_time, double actual_time);
 };
+
 int calculate_resolution_divider_for_resolution(int width, int height, int resolution);
 
 int calculate_resolution_for_divider(int width, int height, int resolution_divider);
diff --git a/intern/cycles/test/integrator_render_scheduler_test.cpp b/intern/cycles/test/integrator_render_scheduler_test.cpp
index 55aa12cfa55..b4efbc2d1a7 100644
--- a/intern/cycles/test/integrator_render_scheduler_test.cpp
+++ b/intern/cycles/test/integrator_render_scheduler_test.cpp
@@ -20,15 +20,6 @@
 
 CCL_NAMESPACE_BEGIN
 
-TEST(IntegratorRenderScheduler, calculate_resolution_divider_for_time)
-{
-  /* Actual time is lover than the desired one. */
-  EXPECT_EQ(calculate_resolution_divider_for_time(1.0, 0.5), 1);
-
-  EXPECT_EQ(calculate_resolution_divider_for_time(1.0, 3.9), 2);
-  EXPECT_EQ(calculate_resolution_divider_for_time(1.0, 7.9), 4);
-}
-
 TEST(IntegratorRenderScheduler, calculate_resolution_divider_for_resolution)
 {
   EXPECT_EQ(calculate_resolution_divider_for_resolution(1920, 1080, 1920), 1);



More information about the Bf-blender-cvs mailing list