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