(Object condition2, Object message2)
| 63 | } |
| 64 | |
| 65 | public static void Assert(Object condition2, Object message2) { |
| 66 | boolean condition = true; |
| 67 | |
| 68 | if (condition2 == null) { |
| 69 | condition = false; |
| 70 | } else if (condition2 instanceof Boolean) { |
| 71 | condition = (Boolean) condition2; |
| 72 | } |
| 73 | |
| 74 | String message = (message2 != null) ? message2.toString() : null; |
| 75 | |
| 76 | if (!condition) { |
| 77 | String errorMessage = "Assertion failed"; |
| 78 | if (message != null) { |
| 79 | errorMessage += ": " + message; |
| 80 | } else { |
| 81 | // errorMessage += "."; |
| 82 | } |
| 83 | throw new RuntimeException(errorMessage); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | public static void Assert(Object condition2) { |
| 88 | Assert(condition2, null); |
no test coverage detected