Fix deprecation warnings on junit.framework.Assert
Use org.junit.Assert instead everywhere. Also fix some other minor warnings
This commit is contained in:
@@ -17,11 +17,11 @@
|
||||
package org.jetbrains.k2js.test.config;
|
||||
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.junit.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -118,7 +118,6 @@ public class JsUnitTestReporter {
|
||||
Assert.fail(sb.toString());
|
||||
}
|
||||
eraseTestInfo(getName());
|
||||
Assert.assertTrue(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import org.jetbrains.k2js.facade.exceptions.TranslationInternalException;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
import org.junit.Assert;
|
||||
|
||||
public final class NumberTest extends SingleFileTranslationTest {
|
||||
public NumberTest() {
|
||||
@@ -55,10 +55,11 @@ public final class NumberTest extends SingleFileTranslationTest {
|
||||
checkFooBoxIsOk();
|
||||
}
|
||||
|
||||
public void testHexademicalConstant() throws Exception {
|
||||
public void testHexadecimalConstant() throws Exception {
|
||||
try {
|
||||
fooBoxTest();
|
||||
} catch (TranslationInternalException e) {
|
||||
}
|
||||
catch (TranslationInternalException e) {
|
||||
Throwable cause = e.getCause();
|
||||
Assert.assertTrue(cause instanceof IllegalStateException);
|
||||
Assert.assertTrue(cause.getMessage().startsWith("Unsupported long constant "));
|
||||
|
||||
Reference in New Issue
Block a user