MyInteger { public boolean isOdd() { return value % 2 != 0; } MyInteger(int value); int get(); boolean isEven(); boolean isOdd(); boolean isPrime(); static boolean isEven(int v); static boolean isOdd(int v); static boolean isPrime(int v); static boolean isEven(MyInteger v); static boolean isOdd(MyInteger v); static boolean isPrime(MyInteger v); @Override boolean equals(Object o); boolean equals(int v); boolean equals(MyInteger v); static int parseInt(char[] c); static int parseInt(String c); @Override String toString();  }
@Test @DisplayName("测试isOdd()普通成员函数") void testIsOddVoid() { for (MyInteger mi : miOdd) { assertTrue(mi.isOdd()); } }
@Test @DisplayName("测试isOdd(int)静态成员函数") void testIsOddInt() { for (int o : odd) { assertTrue(MyInteger.isOdd(o)); } }
@Test @DisplayName("测试isOdd(MyInteger)静态成员函数") void testIsOddMI(){ for(MyInteger mi: miOdd){ assertTrue(MyInteger.isOdd(mi)); } }