Files
kotlin-fork/test/org/jetbrains/jet/j2k/ast/AssertStatementTest.java
T
2011-10-31 16:44:21 +04:00

31 lines
749 B
Java

package org.jetbrains.jet.j2k.ast;
import junit.framework.Assert;
import org.jetbrains.jet.j2k.JetTestCaseBase;
/**
* @author ignatov
*/
public class AssertStatementTest extends JetTestCaseBase {
public void testOnlyCondition() throws Exception {
Assert.assertEquals(
statementToKotlin("assert boolMethod();"),
"assert {boolMethod()}"
);
}
public void testOnlyConditionWithBraces() throws Exception {
Assert.assertEquals(
statementToKotlin("assert(boolMethod());"),
"assert {(boolMethod())}"
);
}
public void testWithStringDetail() throws Exception {
Assert.assertEquals(
statementToKotlin("assert true : \"string details\";"),
"assert(\"string details\") {true}"
);
}
}