Build: add instrumentation to all JavaCompile tasks

This commit is contained in:
Vyacheslav Gerasimov
2018-12-13 22:19:24 +03:00
parent 9ad899fb01
commit 95a3b337c6
5 changed files with 121 additions and 5 deletions
@@ -0,0 +1,28 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.test.util;
import junit.framework.TestCase;
import org.jetbrains.annotations.NotNull;
import org.junit.Assert;
public class NotNullInstrumentationTest extends TestCase {
public void testArgument() {
try {
//noinspection ConstantConditions
instrumented(null);
} catch (IllegalArgumentException e) {
return;
}
Assert.fail("IllegalArgumentException is expected");
}
private void instrumented(@NotNull Object o) {
// This method should be instrumented with not null check
}
}