/*
 * Copyright 2021 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.j2cl.integration.testing;

import com.google.j2cl.integration.testing.Asserts.JsRunnable;

/**
 * Re-implement assertThrows methods as no-op operations because J2WASM does not have proper
 * exception emulation. This will allow us to enable some integration tests for WASM that uses these
 * methods without modifying them directly. TODO(dramaix): Get rid of this class when proper
 * exception support is implemented by J2WASM.
 */
class AssertsBase {
  public static void fail() {
    throw new AssertionError();
  }

  public static void fail(String message) {
    throw new AssertionError(message);
  }

  public static void assertTrue(boolean condition) {
    if (!condition) {
      fail();
    }
  }

  public static void assertTrue(String message, boolean condition) {
    if (!condition) {
      fail(message);
    }
  }

  static void assertThrowsClassCastException(JsRunnable runnable, String qualifiedBinaryName) {}

  static void assertThrows(Class<? extends Exception> exceptionClass, JsRunnable runnable) {}
}

@@ -1437,24 +1437,31 @@
    %7D%0A  %7D%0A%0A  
+public 
 static void 
@@ -1491,16 +1491,23 @@
 ception(
+%0A      
 JsRunnab
@@ -1553,16 +1553,23 @@
 ) %7B%7D%0A%0A  
+public 
 static v

Fix visibility of assertThrows methods for wasm.