提交 a106a908 authored 作者: noelgrandin's avatar noelgrandin

use an else here, doesn't change the execution of the code, just makes it easier to read

上级 cda0f49f
...@@ -678,7 +678,7 @@ public abstract class TestBase { ...@@ -678,7 +678,7 @@ public abstract class TestBase {
} else if (expected == null || actual == null) { } else if (expected == null || actual == null) {
fail("Expected: " + expected + " Actual: " + actual + " " + message); fail("Expected: " + expected + " Actual: " + actual + " " + message);
} }
if (!expected.equals(actual)) { else if (!expected.equals(actual)) {
for (int i = 0; i < expected.length(); i++) { for (int i = 0; i < expected.length(); i++) {
String s = expected.substring(0, i); String s = expected.substring(0, i);
if (!actual.startsWith(s)) { if (!actual.startsWith(s)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论