Minor. Add tests checking not-null assertions

More precisely these tests check cases when expected type
was somehow obtained from captured type (in member scope with projections)
This commit is contained in:
Denis Zharkov
2015-12-22 11:45:02 +03:00
parent 7aaa6422b4
commit 58caff3411
4 changed files with 32 additions and 4 deletions
@@ -157,6 +157,22 @@ public class GenerateNotNullAssertionsTest extends CodegenTestCase {
assertNoIntrinsicsMethodIsCalledInMyClasses(true);
}
public void testNoAssertionForNullableCaptured() {
setUpEnvironment(false, true);
loadFile("notNullAssertions/noAssertionForNullableCaptured.kt");
assertNoIntrinsicsMethodIsCalledInMyClasses(true);
}
public void testAssertionForNotNullCaptured() {
setUpEnvironment(false, true);
loadFile("notNullAssertions/assertionForNotNullCaptured.kt");
assertTrue(generateToText().contains("checkExpressionValueIsNotNull"));
}
public void testNoAssertionForNullableGenericMethodCall() {
setUpEnvironment(false, true);