Update test expectation for CF backend

Change-Id: I5d88d79fb77ad2761645f97e34cda9b442f0e7ab
diff --git a/src/test/java/com/android/tools/r8/ir/optimize/staticizer/CompanionClassWithNewInstanceUserTest.java b/src/test/java/com/android/tools/r8/ir/optimize/staticizer/CompanionClassWithNewInstanceUserTest.java
index 42586c7..74dc3f4 100644
--- a/src/test/java/com/android/tools/r8/ir/optimize/staticizer/CompanionClassWithNewInstanceUserTest.java
+++ b/src/test/java/com/android/tools/r8/ir/optimize/staticizer/CompanionClassWithNewInstanceUserTest.java
@@ -43,13 +43,18 @@
   }
 
   private void inspect(CodeInspector inspector) {
-    // The companion class has been removed.
-    assertThat(inspector.clazz(Companion.class), not(isPresent()));
+    if (parameters.isCfRuntime()) {
+      // Class staticizer is disabled when generating class files.
+      assertThat(inspector.clazz(Companion.class), isPresent());
+    } else {
+      // The companion class has been removed.
+      assertThat(inspector.clazz(Companion.class), not(isPresent()));
 
-    // The companion method has been moved to the companion host class.
-    ClassSubject hostClassSubject = inspector.clazz(CompanionHost.class);
-    assertThat(hostClassSubject, isPresent());
-    assertThat(hostClassSubject.uniqueMethodWithName("method"), isPresent());
+      // The companion method has been moved to the companion host class.
+      ClassSubject hostClassSubject = inspector.clazz(CompanionHost.class);
+      assertThat(hostClassSubject, isPresent());
+      assertThat(hostClassSubject.uniqueMethodWithName("method"), isPresent());
+    }
   }
 
   static class TestClass {