Fix test on StringBuilder.append

Bug: b/380182105
Fixes: b/369739224
Change-Id: I24014bfcd22946771481636a02c1fe35957091c9
diff --git a/src/test/java/com/android/tools/r8/ir/optimize/string/B369739224Test.java b/src/test/java/com/android/tools/r8/ir/optimize/string/B369739224Test.java
index 615ba60..bc159f5 100644
--- a/src/test/java/com/android/tools/r8/ir/optimize/string/B369739224Test.java
+++ b/src/test/java/com/android/tools/r8/ir/optimize/string/B369739224Test.java
@@ -49,8 +49,7 @@
         .addKeepMainRule(TestClass.class)
         .setMinApi(parameters)
         .run(parameters.getRuntime(), TestClass.class)
-        // TODO(b/369739224): Should throw IndexOutOfBoundsException.
-        .assertSuccessWithOutputLines("46");
+        .assertFailureWithErrorThatThrows(IndexOutOfBoundsException.class);
   }
 
   static class TestClass {