aboutsummaryrefslogtreecommitdiff
path: root/integration_tests/nativegraphics/src/test/java/org/robolectric/integrationtests/nativegraphics/ShadowNativeHardwareRendererTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'integration_tests/nativegraphics/src/test/java/org/robolectric/integrationtests/nativegraphics/ShadowNativeHardwareRendererTest.java')
-rw-r--r--integration_tests/nativegraphics/src/test/java/org/robolectric/integrationtests/nativegraphics/ShadowNativeHardwareRendererTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/integration_tests/nativegraphics/src/test/java/org/robolectric/integrationtests/nativegraphics/ShadowNativeHardwareRendererTest.java b/integration_tests/nativegraphics/src/test/java/org/robolectric/integrationtests/nativegraphics/ShadowNativeHardwareRendererTest.java
new file mode 100644
index 000000000..2b6c48d7b
--- /dev/null
+++ b/integration_tests/nativegraphics/src/test/java/org/robolectric/integrationtests/nativegraphics/ShadowNativeHardwareRendererTest.java
@@ -0,0 +1,27 @@
+package org.robolectric.integrationtests.nativegraphics;
+
+import static android.os.Build.VERSION_CODES.Q;
+
+import android.graphics.HardwareRenderer;
+import android.view.Choreographer;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.annotation.Config;
+
+@Config(minSdk = Q)
+@RunWith(RobolectricTestRunner.class)
+public class ShadowNativeHardwareRendererTest {
+
+ @Test
+ public void test_hardwareRenderer() {
+ HardwareRenderer unused = new HardwareRenderer();
+ }
+
+ @Test
+ public void choreographer_firstCalled() {
+ // In some SDK levels, the Choreographer constructor ends up calling
+ // HardwareRenderer.nHackySetRTAnimationsEnabled. Ensure that RNG is loaded if this happens.
+ var unused = Choreographer.getInstance();
+ }
+}