You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

MainTest.java 425 B

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1234567891011121314151617181920212223242526
  1. package com.educoder.bridge;
  2. import org.junit.Test;
  3. /**
  4. * @Author: youys
  5. * @Date: 2023/2/27
  6. * @Description:
  7. */
  8. public class MainTest {
  9. @Test
  10. public void test(){
  11. int a = 1;
  12. int b = 0;
  13. assert b > 0 : String.format("%s/%s, 除数不能为0",a, b);
  14. }
  15. @Test
  16. public void test2(){
  17. int i=10;
  18. assert i > 10 : String.format("变量i=%s,需要大于10", i);
  19. }
  20. }