package com.intellij.codeInsight.unwrap; public class UnwrapWhileTest extends UnwrapTestCase { public void testWhileWithStatement() throws Exception { assertUnwrapped("while(true) System.gc();\n", "System.gc();\n"); } public void testWhileWithBlock() throws Exception { assertUnwrapped("while(true) {\n" + " System.gc();\n" + "}\n", "System.gc();\n"); } public void testDoWhile() throws Exception { assertUnwrapped("do {\n" + " System.gc();\n" + "} while(true);\n", "System.gc();\n"); } public void testEmptyWhile() throws Exception { assertUnwrapped("{\n" + " while(true);\n" + "}\n", "{\n" + "}\n"); } }