add assert to ControlFlowTest
This commit is contained in:
@@ -179,7 +179,8 @@ public class JetControlFlowTest extends JetLiteFixture {
|
|||||||
private static String formatInstruction(Instruction instruction, int maxLength, Set<Instruction> remainedAfterPostProcessInstructions) {
|
private static String formatInstruction(Instruction instruction, int maxLength, Set<Instruction> remainedAfterPostProcessInstructions) {
|
||||||
String[] parts = instruction.toString().split("\n");
|
String[] parts = instruction.toString().split("\n");
|
||||||
boolean isRemovedThroughPostProcess = !remainedAfterPostProcessInstructions.contains(instruction);
|
boolean isRemovedThroughPostProcess = !remainedAfterPostProcessInstructions.contains(instruction);
|
||||||
String prefix = isRemovedThroughPostProcess ? "- " : ((InstructionImpl)instruction).isDead() ? "* " : " ";
|
assert isRemovedThroughPostProcess == ((InstructionImpl)instruction).isDead();
|
||||||
|
String prefix = isRemovedThroughPostProcess ? "- " : " ";
|
||||||
if (parts.length == 1) {
|
if (parts.length == 1) {
|
||||||
return prefix + String.format("%1$-" + maxLength + "s", instruction);
|
return prefix + String.format("%1$-" + maxLength + "s", instruction);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user