Revert replacing "NUMBER" to "INVOCATION_COUNT" and replace "TIME" to "INVOCATION_COUNT"
This commit is contained in:
@@ -15,5 +15,5 @@ class TestSample() {
|
||||
}
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// EXIST: testVar, testFun, testTop
|
||||
@@ -4,5 +4,5 @@ fun anyfun() {
|
||||
a.b.c.d.e.f.<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 0
|
||||
// INVOCATION_COUNT: 1
|
||||
// NUMBER: 0
|
||||
@@ -4,5 +4,5 @@ fun anyfun() {
|
||||
a.b.c.d.e.f.<caret>
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 0
|
||||
// INVOCATION_COUNT: 2
|
||||
// NUMBER: 0
|
||||
@@ -2,7 +2,7 @@ class Test {
|
||||
val St<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: String~(jet)
|
||||
// EXIST: IllegalStateException
|
||||
// EXIST_JAVA_ONLY: StringBuilder
|
||||
|
||||
@@ -3,7 +3,7 @@ fun testing() {}
|
||||
fun S<caret>
|
||||
|
||||
// Should complete types for receiver after explicit basic completion call
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: String
|
||||
// EXIST_JAVA_ONLY: StringBuffer
|
||||
// EXIST: Set
|
||||
|
||||
@@ -2,7 +2,7 @@ class Test {
|
||||
val St<caret>
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// EXIST: String~(jet)
|
||||
// EXIST: IllegalStateException
|
||||
// EXIST: StringBuilder
|
||||
|
||||
@@ -12,7 +12,7 @@ class StrMore {
|
||||
class StrAbsent
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: String~(jet)
|
||||
// EXIST: StrSome
|
||||
// EXIST: StrMore
|
||||
|
||||
@@ -7,4 +7,4 @@ class Test {
|
||||
}
|
||||
|
||||
// EXIST: util
|
||||
// INVOCATION_COUNT: 1
|
||||
// NUMBER: 1
|
||||
|
||||
@@ -2,4 +2,4 @@ package kttesting<caret>.util
|
||||
|
||||
// Test that there won't be package with completion fake suffix
|
||||
|
||||
// INVOCATION_COUNT: 0
|
||||
// NUMBER: 0
|
||||
@@ -4,7 +4,7 @@ class SomeClass {
|
||||
fun some(a : S<caret>)
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: SomeClass, SomeInternal
|
||||
// EXIST: String~(jet)
|
||||
// EXIST: IllegalStateException
|
||||
|
||||
@@ -4,7 +4,7 @@ class SomeClass {
|
||||
fun some(a : S<caret>)
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// EXIST: SomeClass, SomeInternal
|
||||
// EXIST: String~(jet)
|
||||
// EXIST: IllegalStateException
|
||||
|
||||
@@ -7,6 +7,6 @@ fun firstFun() {
|
||||
Testin<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: Testing
|
||||
// INVOCATION_COUNT: 1
|
||||
// NUMBER: 1
|
||||
@@ -4,5 +4,5 @@ fun test() {
|
||||
val a : Named<caret>
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// ABSENT: NamedObject
|
||||
|
||||
@@ -4,6 +4,6 @@ fun firstFun() {
|
||||
val a = In<caret>
|
||||
}
|
||||
|
||||
// TIME: 0
|
||||
// INVOCATION_COUNT: 0
|
||||
// EXIST: Int~(jet)
|
||||
// ABSENT: Int~(jet.runtime.SharedVar)
|
||||
@@ -21,4 +21,4 @@ fun testMy() {
|
||||
}
|
||||
|
||||
// EXIST: testOther
|
||||
// INVOCATION_COUNT: 3
|
||||
// NUMBER: 3
|
||||
@@ -2,7 +2,7 @@ fun main(args: Array<String>) {
|
||||
Array<caret>
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// WITH_ORDER: 1
|
||||
// EXIST: Array~(jet)
|
||||
// EXIST_JAVA_ONLY: Array~(java.sql)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fun some(a: Double<caret>) {
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// WITH_ORDER: 1
|
||||
// EXIST: Double~(jet)
|
||||
// EXIST_JAVA_ONLY: Double~(java.lang)
|
||||
|
||||
@@ -9,7 +9,7 @@ fun test() {
|
||||
Some().<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: testPublic, testPackage
|
||||
// ABSENT: testPrivate, testProtected
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ fun test() {
|
||||
Some().<caret>
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// EXIST: testPublic, testProtected, testPrivate, testPackage
|
||||
@@ -11,6 +11,6 @@ class SomeSubclass : Some() {
|
||||
}
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: testPublic, testProtected, testPackage
|
||||
// ABSENT: testPrivate
|
||||
@@ -11,5 +11,5 @@ class SomeSubclass : Some() {
|
||||
}
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// EXIST: testPublic, testProtected, testPackage, testPrivate
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun some(a : Statement<caret>)
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: Statement@Statement~(java.sql)
|
||||
@@ -7,6 +7,6 @@ fun firstFun() {
|
||||
a.toLinke<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// EXIST: toLinkedList@toLinkedList()~for jet.Iterable<T> in kotlin
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: toLinkedList@toLinkedList()~for jet.Iterable<T> in kotlin
|
||||
// NUMBER: 1
|
||||
|
||||
@@ -7,6 +7,6 @@ class Hello() {
|
||||
}
|
||||
}
|
||||
|
||||
// TIME: 2
|
||||
// INVOCATION_COUNT: 2
|
||||
// EXIST: SortedMap, Short, Socket
|
||||
// ABSENT: hashSetOf
|
||||
@@ -1,5 +1,5 @@
|
||||
val x = LineIterator<caret>
|
||||
|
||||
// TIME: 1
|
||||
// EXIST: LineIterator~(kotlin.io)
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: LineIterator~(kotlin.io)
|
||||
// NUMBER: 1
|
||||
|
||||
@@ -2,6 +2,6 @@ import java.io.InputStreamReader
|
||||
|
||||
val x = InputStreamReader<caret>
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: InputStreamReader~(java.io)
|
||||
// INVOCATION_COUNT: 1
|
||||
// NUMBER: 1
|
||||
@@ -5,7 +5,7 @@ fun firstFun() {
|
||||
val a = PropertyM<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: PropertyMetadata@PropertyMetadata~(jet)
|
||||
// EXIST: PropertyMetadataImpl@PropertyMetadataImpl~(jet)
|
||||
// INVOCATION_COUNT: 2
|
||||
// NUMBER: 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
fun some(a : HTMLStyle<caret>)
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
// EXIST: HTMLStyleElement
|
||||
|
||||
@@ -12,4 +12,4 @@ fun firstFun() {
|
||||
// EXIST: testingExpectedFunction
|
||||
// ABSENT: testingUnexpectedFunction
|
||||
|
||||
// INVOCATION_COUNT: 2
|
||||
// NUMBER: 2
|
||||
@@ -8,4 +8,4 @@ fun firstFun() {
|
||||
// ABSENT: helloFun
|
||||
// ABSENT: helloFunPreventAutoInsert
|
||||
// ABSENT: helloWithParams
|
||||
// INVOCATION_COUNT: 0
|
||||
// NUMBER: 0
|
||||
@@ -9,4 +9,4 @@ fun firstFun() {
|
||||
// EXIST: helloFunPreventAutoInsert
|
||||
// EXIST: helloWithParams
|
||||
// ABSENT: helloFake
|
||||
// INVOCATION_COUNT: 3
|
||||
// NUMBER: 3
|
||||
@@ -9,4 +9,4 @@ fun firstFun() {
|
||||
// EXIST: someProperty
|
||||
// EXIST: someOtherProperty
|
||||
// EXIST: someSelfProperty
|
||||
// INVOCATION_COUNT: 3
|
||||
// NUMBER: 3
|
||||
@@ -9,4 +9,4 @@ fun firstFun() {
|
||||
// EXIST: helloFunPreventAutoInsert
|
||||
// EXIST: helloWithParams
|
||||
// ABSENT: helloFake
|
||||
// INVOCATION_COUNT: 3
|
||||
// NUMBER: 3
|
||||
@@ -6,4 +6,4 @@ public class Testing {
|
||||
|
||||
// EXIST: ClassFromJet
|
||||
// EXIST: SomePackage
|
||||
// INVOCATION_COUNT: 2
|
||||
// NUMBER: 2
|
||||
|
||||
@@ -8,4 +8,4 @@ public class Testing {
|
||||
// ABSENT: jet2
|
||||
|
||||
// Only two proposals expected
|
||||
// INVOCATION_COUNT: 1
|
||||
// NUMBER: 1
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Test {
|
||||
}
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
|
||||
// EXIST: abstract
|
||||
/* // ABSENT: annotation */
|
||||
|
||||
@@ -2,7 +2,7 @@ class TestClass {
|
||||
<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// INVOCATION_COUNT: 1
|
||||
|
||||
// EXIST: abstract
|
||||
// ABSENT: annotation
|
||||
|
||||
@@ -104,11 +104,11 @@ public class ExpectedCompletionUtils {
|
||||
private static final String EXIST_JAVA_ONLY_LINE_PREFIX = "EXIST_JAVA_ONLY:";
|
||||
private static final String EXIST_JS_ONLY_LINE_PREFIX = "EXIST_JS_ONLY:";
|
||||
|
||||
private static final String NUMBER_LINE_PREFIX = "INVOCATION_COUNT:";
|
||||
private static final String NUMBER_JS_LINE_PREFIX = "INVOCATION_COUNT_JS:";
|
||||
private static final String NUMBER_JAVA_LINE_PREFIX = "INVOCATION_COUNT_JAVA:";
|
||||
private static final String NUMBER_LINE_PREFIX = "NUMBER:";
|
||||
private static final String NUMBER_JS_LINE_PREFIX = "NUMBER_JS:";
|
||||
private static final String NUMBER_JAVA_LINE_PREFIX = "NUMBER_JAVA:";
|
||||
|
||||
private static final String EXECUTION_TIME_PREFIX = "TIME:";
|
||||
private static final String INVOCATION_COUNT_PREFIX = "INVOCATION_COUNT:";
|
||||
private static final String WITH_ORDER_PREFIX = "WITH_ORDER:";
|
||||
|
||||
public static final List<String> KNOWN_PREFIXES = ImmutableList.of(
|
||||
@@ -121,7 +121,7 @@ public class ExpectedCompletionUtils {
|
||||
NUMBER_LINE_PREFIX,
|
||||
NUMBER_JS_LINE_PREFIX,
|
||||
NUMBER_JAVA_LINE_PREFIX,
|
||||
EXECUTION_TIME_PREFIX,
|
||||
INVOCATION_COUNT_PREFIX,
|
||||
WITH_ORDER_PREFIX);
|
||||
|
||||
@NotNull
|
||||
@@ -201,8 +201,8 @@ public class ExpectedCompletionUtils {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static Integer getExecutionTime(String fileText) {
|
||||
return InTextDirectivesUtils.getPrefixedInt(fileText, EXECUTION_TIME_PREFIX);
|
||||
public static Integer getInvocationCount(String fileText) {
|
||||
return InTextDirectivesUtils.getPrefixedInt(fileText, INVOCATION_COUNT_PREFIX);
|
||||
}
|
||||
|
||||
public static boolean isWithOrder(String fileText) {
|
||||
|
||||
@@ -47,9 +47,9 @@ public abstract class JetFixtureCompletionBaseTestCase extends LightCodeInsightF
|
||||
|
||||
String fileText = myFixture.getFile().getText();
|
||||
|
||||
Integer completionTime = ExpectedCompletionUtils.getExecutionTime(fileText);
|
||||
Integer invocationCount = ExpectedCompletionUtils.getInvocationCount(fileText);
|
||||
|
||||
myFixture.complete(CompletionType.BASIC, completionTime == null ? 0 : completionTime);
|
||||
myFixture.complete(CompletionType.BASIC, invocationCount == null ? 0 : invocationCount);
|
||||
|
||||
ExpectedCompletionUtils.assertDirectivesValid(fileText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user