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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user