add assert to ControlFlowTest

This commit is contained in:
Svetlana Isakova
2012-12-07 17:50:41 +04:00
parent 8a123f8722
commit d92e989c6e
@@ -179,7 +179,8 @@ public class JetControlFlowTest extends JetLiteFixture {
private static String formatInstruction(Instruction instruction, int maxLength, Set<Instruction> remainedAfterPostProcessInstructions) {
String[] parts = instruction.toString().split("\n");
boolean isRemovedThroughPostProcess = !remainedAfterPostProcessInstructions.contains(instruction);
String prefix = isRemovedThroughPostProcess ? "- " : ((InstructionImpl)instruction).isDead() ? "* " : " ";
assert isRemovedThroughPostProcess == ((InstructionImpl)instruction).isDead();
String prefix = isRemovedThroughPostProcess ? "- " : " ";
if (parts.length == 1) {
return prefix + String.format("%1$-" + maxLength + "s", instruction);
}