(String[] args)
| 68 | } |
| 69 | |
| 70 | public static void main(String[] args) { |
| 71 | int maxLen = 20; |
| 72 | int maxValue = 50; |
| 73 | int testTime = 3000000; |
| 74 | System.out.println("如果没有错误信息打印,说明所有测试通过"); |
| 75 | System.out.println("测试开始"); |
| 76 | for (int i = 0; i < testTime; i++) { |
| 77 | int[] arr = randomArray(maxLen, maxValue); |
| 78 | int ans1 = maxSubArraySum1(arr); |
| 79 | int ans2 = maxSubArraySum2(arr); |
| 80 | int ans3 = maxSubArraySum3(arr); |
| 81 | if (ans1 != ans2 || ans1 != ans3) { |
| 82 | System.out.println("出错了!"); |
| 83 | System.out.println(ans1 + " , " + ans2 + " , " + ans3); |
| 84 | break; |
| 85 | } |
| 86 | } |
| 87 | System.out.println("测试结束"); |
| 88 | } |
| 89 | |
| 90 | } |
nothing calls this directly
no test coverage detected