提交 3605bd88 编写于 作者: D darcy

6926703: apt tests should run with assertions enabled

Reviewed-by: jjg
上级 ae17e828
...@@ -101,7 +101,11 @@ class SourceOrderDeclScanner extends DeclarationScanner { ...@@ -101,7 +101,11 @@ class SourceOrderDeclScanner extends DeclarationScanner {
} }
@SuppressWarnings("cast") @SuppressWarnings("cast")
private int compareEqualPosition(Declaration d1, Declaration d2) { private int compareEqualPosition(Declaration d1, Declaration d2) {
assert d1.getPosition() == d2.getPosition(); assert
(d1.getPosition() == d2.getPosition()) || // Handles d1 == d2 == null
(d1.getPosition().file().compareTo(d2.getPosition().file()) == 0 &&
d1.getPosition().line() == d2.getPosition().line() &&
d1.getPosition().column() == d2.getPosition().column());
DeclPartialOrder dpo1 = new DeclPartialOrder(); DeclPartialOrder dpo1 = new DeclPartialOrder();
DeclPartialOrder dpo2 = new DeclPartialOrder(); DeclPartialOrder dpo2 = new DeclPartialOrder();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册