Refactoring: change test data directive

This commit is contained in:
Nikolay Krasko
2013-09-16 15:53:40 +04:00
parent 29448c149c
commit 839df96200
20 changed files with 22 additions and 22 deletions
@@ -5,4 +5,4 @@ fun anyfun() {
} }
// TIME: 1 // TIME: 1
// NUMBER: 0 // INVOCATION_COUNT: 0
@@ -5,4 +5,4 @@ fun anyfun() {
} }
// TIME: 2 // TIME: 2
// NUMBER: 0 // INVOCATION_COUNT: 0
@@ -7,4 +7,4 @@ class Test {
} }
// EXIST: util // EXIST: util
// NUMBER: 1 // INVOCATION_COUNT: 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
// NUMBER: 0 // INVOCATION_COUNT: 0
@@ -9,4 +9,4 @@ fun firstFun() {
// TIME: 1 // TIME: 1
// EXIST: Testing // EXIST: Testing
// NUMBER: 1 // INVOCATION_COUNT: 1
@@ -21,4 +21,4 @@ fun testMy() {
} }
// EXIST: testOther // EXIST: testOther
// NUMBER: 3 // INVOCATION_COUNT: 3
@@ -9,4 +9,4 @@ fun firstFun() {
// TIME: 1 // TIME: 1
// EXIST: toLinkedList@toLinkedList()~for jet.Iterable<T> in kotlin // EXIST: toLinkedList@toLinkedList()~for jet.Iterable<T> in kotlin
// NUMBER: 1 // INVOCATION_COUNT: 1
@@ -2,4 +2,4 @@ val x = LineIterator<caret>
// TIME: 1 // TIME: 1
// EXIST: LineIterator~(kotlin.io) // EXIST: LineIterator~(kotlin.io)
// NUMBER: 1 // INVOCATION_COUNT: 1
@@ -4,4 +4,4 @@ val x = InputStreamReader<caret>
// TIME: 1 // TIME: 1
// EXIST: InputStreamReader~(java.io) // EXIST: InputStreamReader~(java.io)
// NUMBER: 1 // INVOCATION_COUNT: 1
@@ -8,4 +8,4 @@ fun firstFun() {
// TIME: 1 // TIME: 1
// EXIST: PropertyMetadata@PropertyMetadata~(jet) // EXIST: PropertyMetadata@PropertyMetadata~(jet)
// EXIST: PropertyMetadataImpl@PropertyMetadataImpl~(jet) // EXIST: PropertyMetadataImpl@PropertyMetadataImpl~(jet)
// NUMBER: 2 // INVOCATION_COUNT: 2
@@ -12,4 +12,4 @@ fun firstFun() {
// EXIST: testingExpectedFunction // EXIST: testingExpectedFunction
// ABSENT: testingUnexpectedFunction // ABSENT: testingUnexpectedFunction
// NUMBER: 2 // INVOCATION_COUNT: 2
@@ -8,4 +8,4 @@ fun firstFun() {
// ABSENT: helloFun // ABSENT: helloFun
// ABSENT: helloFunPreventAutoInsert // ABSENT: helloFunPreventAutoInsert
// ABSENT: helloWithParams // ABSENT: helloWithParams
// NUMBER: 0 // INVOCATION_COUNT: 0
@@ -9,4 +9,4 @@ fun firstFun() {
// EXIST: helloFunPreventAutoInsert // EXIST: helloFunPreventAutoInsert
// EXIST: helloWithParams // EXIST: helloWithParams
// ABSENT: helloFake // ABSENT: helloFake
// NUMBER: 3 // INVOCATION_COUNT: 3
@@ -9,4 +9,4 @@ fun firstFun() {
// EXIST: someProperty // EXIST: someProperty
// EXIST: someOtherProperty // EXIST: someOtherProperty
// EXIST: someSelfProperty // EXIST: someSelfProperty
// NUMBER: 3 // INVOCATION_COUNT: 3
@@ -9,4 +9,4 @@ fun firstFun() {
// EXIST: helloFunPreventAutoInsert // EXIST: helloFunPreventAutoInsert
// EXIST: helloWithParams // EXIST: helloWithParams
// ABSENT: helloFake // ABSENT: helloFake
// NUMBER: 3 // INVOCATION_COUNT: 3
@@ -6,4 +6,4 @@ public class Testing {
// EXIST: ClassFromJet // EXIST: ClassFromJet
// EXIST: SomePackage // EXIST: SomePackage
// NUMBER: 2 // INVOCATION_COUNT: 2
@@ -8,4 +8,4 @@ public class Testing {
// ABSENT: jet2 // ABSENT: jet2
// Only two proposals expected // Only two proposals expected
// NUMBER: 1 // INVOCATION_COUNT: 1
@@ -8,5 +8,5 @@ val some = foo<caret>
// "foo" is before other elements because of exact prefix match // "foo" is before other elements because of exact prefix match
// ORDER: foo, fooVar, fooLocal, fooImported, fooNotImported // ORDER: foo, fooVar, fooLocal, fooImported, fooNotImported
// NUMBER: 2 // INVOCATION_COUNT: 2
// SELECTED: 1 // SELECTED: 1
@@ -104,9 +104,9 @@ 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 = "NUMBER:"; private static final String NUMBER_LINE_PREFIX = "INVOCATION_COUNT:";
private static final String NUMBER_JS_LINE_PREFIX = "NUMBER_JS:"; private static final String NUMBER_JS_LINE_PREFIX = "INVOCATION_COUNT_JS:";
private static final String NUMBER_JAVA_LINE_PREFIX = "NUMBER_JAVA:"; private static final String NUMBER_JAVA_LINE_PREFIX = "INVOCATION_COUNT_JAVA:";
private static final String EXECUTION_TIME_PREFIX = "TIME:"; private static final String EXECUTION_TIME_PREFIX = "TIME:";
private static final String WITH_ORDER_PREFIX = "WITH_ORDER:"; private static final String WITH_ORDER_PREFIX = "WITH_ORDER:";
@@ -45,7 +45,7 @@ public abstract class AbstractCompletionWeigherTest() : LightCodeInsightFixtureT
val items = InTextDirectivesUtils.findArrayWithPrefixes(text, "// ORDER:") val items = InTextDirectivesUtils.findArrayWithPrefixes(text, "// ORDER:")
Assert.assertTrue(!items.isEmpty(), """Some items should be defined with "// ORDER:" directive""") Assert.assertTrue(!items.isEmpty(), """Some items should be defined with "// ORDER:" directive""")
fixture.complete(CompletionType.BASIC, InTextDirectivesUtils.getPrefixedInt(text, "// NUMBER:") ?: 1) fixture.complete(CompletionType.BASIC, InTextDirectivesUtils.getPrefixedInt(text, "// INVOCATION_COUNT:") ?: 1)
fixture.assertPreferredCompletionItems(InTextDirectivesUtils.getPrefixedInt(text, "// SELECTED:") ?: 0, *items) fixture.assertPreferredCompletionItems(InTextDirectivesUtils.getPrefixedInt(text, "// SELECTED:") ?: 0, *items)
} }