|
@@ -13,13 +13,13 @@ public class MainTest { |
|
|
@Test |
|
|
@Test |
|
|
public void test(){ |
|
|
public void test(){ |
|
|
int a = 1; |
|
|
int a = 1; |
|
|
int b = 0; |
|
|
|
|
|
|
|
|
int b = 1; |
|
|
assert b > 0 : String.format("%s/%s, 除数不能为0",a, b); |
|
|
assert b > 0 : String.format("%s/%s, 除数不能为0",a, b); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
public void test2(){ |
|
|
public void test2(){ |
|
|
int i=10; |
|
|
|
|
|
|
|
|
int i=11; |
|
|
assert i > 10 : String.format("变量i=%s,需要大于10", i); |
|
|
assert i > 10 : String.format("变量i=%s,需要大于10", i); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|