Update art tests

Jack generates different code compared to the previous release so
some tests need to be updated. For instance, Jack transform '!cond'
into 'cond xor 1'.

The test 463-checker-boolean-simplifier still tests the if/else
pattern using smali.

(cherry picked from commit e4d28c502486afe58a0e156b8fefb621a622cec2)

Bug: 29493697
Test: lunch aosp_bullhead-userdebug && make -j32
Test: make -j32 test-art-host && make -j32 test-art-target
Test: art/tools/run-jdwp-tests.sh --mode=host
Change-Id: Ief8ac3e9a4bcaa35c99e57161961d630333d3b3c
diff --git a/test/463-checker-boolean-simplifier/src/Main.java b/test/463-checker-boolean-simplifier/src/Main.java
index f0fe1b1..9368488 100644
--- a/test/463-checker-boolean-simplifier/src/Main.java
+++ b/test/463-checker-boolean-simplifier/src/Main.java
@@ -32,42 +32,14 @@
     }
   }
 
-  /*
-   * Elementary test negating a boolean. Verifies that blocks are merged and
-   * empty branches removed.
-   */
-
-  /// CHECK-START: boolean Main.BooleanNot(boolean) select_generator (before)
-  /// CHECK-DAG:     <<Param:z\d+>>    ParameterValue
-  /// CHECK-DAG:     <<Const0:i\d+>>   IntConstant 0
-  /// CHECK-DAG:     <<Const1:i\d+>>   IntConstant 1
-  /// CHECK-DAG:                       If [<<Param>>]
-  /// CHECK-DAG:     <<Phi:i\d+>>      Phi [<<Const0>>,<<Const1>>]
-  /// CHECK-DAG:                       Return [<<Phi>>]
-
-  /// CHECK-START: boolean Main.BooleanNot(boolean) select_generator (before)
-  /// CHECK:                           Goto
-  /// CHECK:                           Goto
-  /// CHECK:                           Goto
-  /// CHECK-NOT:                       Goto
-
-  /// CHECK-START: boolean Main.BooleanNot(boolean) select_generator (after)
-  /// CHECK-DAG:     <<Param:z\d+>>    ParameterValue
-  /// CHECK-DAG:     <<Const0:i\d+>>   IntConstant 0
-  /// CHECK-DAG:     <<Const1:i\d+>>   IntConstant 1
-  /// CHECK-DAG:     <<NotParam:i\d+>> Select [<<Const1>>,<<Const0>>,<<Param>>]
-  /// CHECK-DAG:                       Return [<<NotParam>>]
-
-  /// CHECK-START: boolean Main.BooleanNot(boolean) select_generator (after)
-  /// CHECK-NOT:                       If
-  /// CHECK-NOT:                       Phi
-
-  /// CHECK-START: boolean Main.BooleanNot(boolean) select_generator (after)
-  /// CHECK:                           Goto
-  /// CHECK-NOT:                       Goto
-
-  public static boolean BooleanNot(boolean x) {
-    return !x;
+  // Invoke a method written in smali that implements the boolean ! operator. This method
+  // uses the if/else pattern generated by dx (while Jack generates a different pattern).
+  // Since this method is in a smali-generated class, we invoke it through reflection.
+  public static boolean SmaliBooleanNot(boolean x) throws Exception {
+      Class<?> c = Class.forName("BooleanNotSmali");
+      java.lang.reflect.Method method = c.getMethod("BooleanNot", boolean.class);
+      Object retValue = method.invoke(null, new Object[] { Boolean.valueOf(x) });
+      return ((Boolean) retValue).booleanValue();
   }
 
   /*
@@ -357,9 +329,9 @@
     return x ? 42 : (write_field = 43);
   }
 
-  public static void main(String[] args) {
-    assertBoolEquals(false, BooleanNot(true));
-    assertBoolEquals(true, BooleanNot(false));
+  public static void main(String[] args) throws Exception {
+    assertBoolEquals(false, SmaliBooleanNot(true));
+    assertBoolEquals(true, SmaliBooleanNot(false));
     assertBoolEquals(true, GreaterThan(10, 5));
     assertBoolEquals(false, GreaterThan(10, 10));
     assertBoolEquals(false, GreaterThan(5, 10));