Better test data format

This commit is contained in:
Valentin Kipyatkov
2015-05-18 11:11:27 +03:00
parent 603f7ef3c1
commit 54836113a7
77 changed files with 78 additions and 78 deletions
@@ -16,6 +16,6 @@ class Derived: Base<String>() {
// INVOCATION_COUNT: 1
// EXIST: funInBase, funWithOverride, funWithoutOverride
// NOTHING_ELSE: true
// NOTHING_ELSE
// RUNTIME_TYPE: Derived
@@ -20,6 +20,6 @@ class C: B() {
// INVOCATION_COUNT: 2
// EXIST: funA, funAp, funB, funBp, funC, funCp
// NOTHING_ELSE: true
// NOTHING_ELSE
// RUNTIME_TYPE: C
@@ -14,7 +14,7 @@ fun Base.funExtBase() { }
// INVOCATION_COUNT: 1
// EXIST: funExtBase, funExtDerived
// NOTHING_ELSE: true
// NOTHING_ELSE
// RUNTIME_TYPE: Derived
@@ -18,7 +18,7 @@ class Derived: Base() {
// INVOCATION_COUNT: 1
// EXIST: funInBase, funWithOverride, funWithoutOverride, funInDerived
// NOTHING_ELSE: true
// NOTHING_ELSE
// RUNTIME_TYPE: Derived
@@ -7,4 +7,4 @@ class Test {
}
// EXIST: util
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -8,4 +8,4 @@ fun foo() {
// EXIST: ext1
// EXIST: ext2
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ fun firstFun() {
// INVOCATION_COUNT: 1
// EXIST: Testing
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -15,4 +15,4 @@ fun g(a: A) {
// EXIST: foo
// EXIST: foo1
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -8,4 +8,4 @@ fun test() = small(paramFirst = param<caret>)
// EXIST: paramTest
// ABSENT: {"lookupString":"paramFirst","tailText":" Int","itemText":"paramFirst ="}
// ABSENT: paramSecond
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -7,4 +7,4 @@ fun test(p: Int) = foo(12, third = "", <caret>)
// ABSENT: first
// ABSENT: third
// EXIST: second
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ fun test() = small(param<caret>First = 12)
// EXIST: paramSecond
// EXIST: paramTest
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ fun firstFun() {
// INVOCATION_COUNT: 1
// EXIST: { lookupString:"toLinkedList", itemText:"toLinkedList", tailText:"() for Iterable<T> in kotlin" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -4,4 +4,4 @@ val x = InputStreamReader<caret>
// INVOCATION_COUNT: 2
// EXIST: { lookupString:"InputStreamReader", tailText:" (java.io)" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -2,4 +2,4 @@ val x = LinesSequence<caret>
// INVOCATION_COUNT: 2
// EXIST: { lookupString:"LinesSequence", tailText:" (kotlin.io)" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -12,4 +12,4 @@ fun firstFun() {
// EXIST: testingExpectedFunction
// ABSENT: testingUnexpectedFunction
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ fun firstFun() {
// EXIST: helloFunPreventAutoInsert
// EXIST: helloWithParams
// ABSENT: helloFake
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -4,4 +4,4 @@ class A : NotImported<caret>
// AUTOCOMPLETE_SETTING: true
// EXIST: NotImportedClass
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -6,4 +6,4 @@ fun f() {
// EXIST: extFun1
// EXIST: extFun2
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -6,4 +6,4 @@ fun foo() {
}
// EXIST: pair
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -11,4 +11,4 @@ class C {
// EXIST: helloProp
// EXIST: helloForC
// ABSENT: helloFake
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ fun firstFun(p: () -> Unit) {
// EXIST: helloAny
// ABSENT: helloFun3
// ABSENT: helloFun4
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -10,4 +10,4 @@ fun firstFun(p: String.() -> Unit) {
// ABSENT: helloFun4
// EXIST: helloFun5
// EXIST: helloAny
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -6,4 +6,4 @@ fun firstFun(x: third.Dependency) {
// EXIST: helloFun
// EXIST: helloFunGeneric
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ fun firstFun() {
// EXIST: { lookupString: "helloProp2", attributes: "bold" }
// ABSENT: helloProp3
// ABSENT: helloProp4
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -35,4 +35,4 @@ class MouseMovedEventArgs
// EXIST: init
/*why?*/
// EXIST: companion object
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -39,4 +39,4 @@ class B {
/*why?*/
// EXIST: companion object
/*TODO*/
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -38,4 +38,4 @@ class A {
// EXIST: init
/*why?*/
// EXIST: companion object
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -3,4 +3,4 @@ class A(x: Int) {
}
// EXIST: this, super
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -14,4 +14,4 @@ fun foo() {
// EXIST: { lookupString: "break@myDo", itemText: "break", tailText: "@myDo", attributes: "bold" }
// EXIST: { lookupString: "break@myWhile", itemText: "break", tailText: "@myWhile", attributes: "bold" }
// EXIST: { lookupString: "break@myFor", itemText: "break", tailText: "@myFor", attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -7,4 +7,4 @@ fun foo() {
// EXIST: as
// EXIST: in
// EXIST: is
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -14,4 +14,4 @@ fun foo() {
// EXIST: { lookupString: "continue@myDo", itemText: "continue", tailText: "@myDo", attributes: "bold" }
// EXIST: { lookupString: "continue@myWhile", itemText: "continue", tailText: "@myWhile", attributes: "bold" }
// EXIST: { lookupString: "continue@myFor", itemText: "continue", tailText: "@myFor", attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -1,4 +1,4 @@
[<caret>]
// EXIST: file
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -39,4 +39,4 @@ var a : Int
/*why?*/
// EXIST: companion object
/*TODO*/
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -20,4 +20,4 @@ fun foo(p: Int) {
// EXIST: try
// EXIST: when
// EXIST: while
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -36,4 +36,4 @@ public class Test {
// EXIST: init
/*why?*/
// EXIST: companion object
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -30,4 +30,4 @@ class TestClass {
// EXIST: constructor
// EXIST: init
// EXIST: companion object
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -2,4 +2,4 @@ class T<<caret>>
// EXIST: in
// EXIST: out
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -21,4 +21,4 @@ fun foo() {
// EXIST: var
// EXIST: when
// EXIST: while
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ class C(<caret>)
// EXIST: protected
// EXIST: internal
// EXIST: override
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -14,4 +14,4 @@ fun foo() = <caret>
// EXIST: try
// EXIST: when
// EXIST: while
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -5,4 +5,4 @@ fun foo() {
/*TODO: Is 'package' type qualifier syntax correct?*/
// EXIST: package
// EXIST: dynamic
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -15,4 +15,4 @@ val prop: Int
// EXIST: try
// EXIST: when
// EXIST: while
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -10,4 +10,4 @@ class TestSample() {
// EXIST: var
// EXIST: in
// EXIST: out
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -4,4 +4,4 @@ open class Foo {
}
// EXIST: private, public, protected
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -4,4 +4,4 @@ fun testing() {}
// EXIST: in
// EXIST: out
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -15,4 +15,4 @@ fun foo(p: Int = <caret>)
// EXIST: try
// EXIST: when
// EXIST: while
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -14,4 +14,4 @@ var a : Int = <caret>
// EXIST: try
// EXIST: when
// EXIST: while
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -7,4 +7,4 @@ fun test(<caret>) {
// EXIST: var
// EXIST: in
// EXIST: out
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -30,4 +30,4 @@ package Test
/*why?*/
// EXIST: companion object
/*TODO*/
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -6,4 +6,4 @@ p<caret>
// EXIST: private
// EXIST: protected
// EXIST: public
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -34,4 +34,4 @@ class Some {
// EXIST: constructor
// EXIST: init
// EXIST: companion object
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -34,4 +34,4 @@ class Some {
// EXIST: constructor
// EXIST: init
// EXIST: companion object
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -36,4 +36,4 @@ class Some {
// EXIST: constructor
// EXIST: init
// EXIST: companion object
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -10,4 +10,4 @@ class Outer {
// EXIST: { lookupString: "this@foo", itemText: "this", tailText: "@foo", typeText: "String", attributes: "bold" }
// EXIST: { lookupString: "this@Inner", itemText: "this", tailText: "@Inner", typeText: "Outer.Inner", attributes: "bold" }
// EXIST: { lookupString: "this@Outer", itemText: "this", tailText: "@Outer", typeText: "Outer", attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -2,4 +2,4 @@ val String.foo: Int
get() = this@<caret>.length()
// EXIST: "this@foo"
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -11,4 +11,4 @@ inline fun takeHandler2(handler: () -> Unit){}
// EXIST: { lookupString: "return", itemText: "return", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return@takeHandler1", itemText: "return", tailText: "@takeHandler1", attributes: "bold" }
// EXIST: { lookupString: "return@takeHandler2", itemText: "return", tailText: "@takeHandler2", attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -10,4 +10,4 @@ inline fun takeHandler2(handler: () -> Unit){}
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "return@takeHandler1", itemText: "return", tailText: "@takeHandler1", attributes: "bold" }
// EXIST: { lookupString: "return@takeHandler2", itemText: "return", tailText: "@takeHandler2", attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -6,4 +6,4 @@ fun foo(): Boolean {
// EXIST: { lookupString: "return", itemText: "return", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return true", itemText: "return true", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return false", itemText: "return false", tailText: null, attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -11,4 +11,4 @@ inline fun `val`(handler: () -> Unit){}
// EXIST: { lookupString: "return", itemText: "return", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return@`fun`", itemText: "return", tailText: "@`fun`", attributes: "bold" }
// EXIST: { lookupString: "return@`val`", itemText: "return", tailText: "@`val`", attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -5,4 +5,4 @@ fun foo(): String? {
// INVOCATION_COUNT: 1
// EXIST: { lookupString: "return", itemText: "return", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return null", itemText: "return null", tailText: null, attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -7,4 +7,4 @@ fun foo(): Boolean? {
// EXIST: { lookupString: "return null", itemText: "return null", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return true", itemText: "return true", tailText: null, attributes: "bold" }
// EXIST: { lookupString: "return false", itemText: "return false", tailText: null, attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -25,4 +25,4 @@ fun takeHandler3(handler: Char.() -> Unit){}
// EXIST: { lookupString: "this@Inner", itemText: "this", tailText: "@Inner", typeText: "Outer.Nested.Inner", attributes: "bold" }
// EXIST: { lookupString: "this@Nested", itemText: "this", tailText: "@Nested", typeText: "Outer.Nested", attributes: "bold" }
// ABSENT: "this@Outer"
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -29,4 +29,4 @@
/*why?*/
// EXIST: companion object
/*TODO*/
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -7,4 +7,4 @@ fun bar(pInt: Int, pString: String) {
// EXIST: { lookupString: "param1", itemText: "param1 =" }
// EXIST: { lookupString: "param3", itemText: "param3 =" }
// ABSENT: param2
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -7,4 +7,4 @@ fun bar(pInt: Int, pString: String) {
// EXIST: { lookupString: "param1", itemText: "param1 =" }
// EXIST: { lookupString: "param3", itemText: "param3 =" }
// ABSENT: param2
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -9,4 +9,4 @@ fun f(){
// EXIST: { lookupString: "emptyList", typeText: "List<String>" }
// EXIST: { lookupString: "emptyList", typeText: "List<Int>" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -7,4 +7,4 @@ fun foo(): I = <caret>
// EXIST: { lookupString: "O", itemText: "O", tailText: " (<root>)" }
// EXIST: foo
// EXIST: object
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -14,4 +14,4 @@ fun foo(): T {
// EXIST: foo
// EXIST: object
// ABSENT: Other
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -8,4 +8,4 @@ fun bar(o: Any) {
// EXIST: String
// EXIST: Int
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -8,4 +8,4 @@ fun bar(o: Any) {
// EXIST: { lookupString:"List", itemText:"List<String>" }
// EXIST: { lookupString:"Map", itemText:"Map<String, Int>" }
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -9,4 +9,4 @@ fun bar(o: Any) {
// EXIST: { lookupString:"List", itemText:"List<String>" }
// EXIST: { lookupString:"String", itemText:"String" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -15,4 +15,4 @@ fun foo(c: C): T {
// EXIST: { lookupString: "Inner2", itemText: "Inner2", tailText: "()", typeText: "C.Inner2" }
// ABSENT: Inner3
// ABSENT: Nested
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -8,4 +8,4 @@ fun foo() : C.Inner {
// ABSENT: Inner
// EXIST: foo
// NOTHING_ELSE: true
// NOTHING_ELSE
+1 -1
View File
@@ -10,4 +10,4 @@ class Outer {
// EXIST: { lookupString: "this@foo", itemText: "this", tailText: "@foo", typeText: "String", attributes: "bold" }
// EXIST: { lookupString: "this@Inner", itemText: "this", tailText: "@Inner", typeText: "Outer.Inner", attributes: "bold" }
// EXIST: { lookupString: "this@Outer", itemText: "this", tailText: "@Outer", typeText: "Outer", attributes: "bold" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -9,4 +9,4 @@ fun bar() {
// EXIST: { lookupString: "C2", itemText: "C2<X>" }
// EXIST: { lookupString: "C2", itemText: "C2<Y>" }
// EXIST: { lookupString: "C3", itemText: "C3" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -3,4 +3,4 @@ fun foo(): T = <caret>
// EXIST: foo
// EXIST: { lookupString: "object", itemText: "object: T{...}" }
// EXIST: { lookupString: "OO", itemText: "OO", tailText: " (<root>)" }
// NOTHING_ELSE: true
// NOTHING_ELSE
@@ -123,7 +123,7 @@ public class ExpectedCompletionUtils {
private static final String NUMBER_JS_LINE_PREFIX = "NUMBER_JS:";
private static final String NUMBER_JAVA_LINE_PREFIX = "NUMBER_JAVA:";
private static final String NOTHING_ELSE_PREFIX = "NOTHING_ELSE:";
private static final String NOTHING_ELSE_PREFIX = "NOTHING_ELSE";
private static final String INVOCATION_COUNT_PREFIX = "INVOCATION_COUNT:";
private static final String WITH_ORDER_PREFIX = "WITH_ORDER:";
@@ -218,7 +218,7 @@ public class ExpectedCompletionUtils {
}
public static boolean isNothingElseExpected(String fileText) {
return Boolean.TRUE.equals(InTextDirectivesUtils.getPrefixedBoolean(fileText, NOTHING_ELSE_PREFIX));
return !InTextDirectivesUtils.findLinesWithPrefixesRemoved(fileText, NOTHING_ELSE_PREFIX).isEmpty();
}
@Nullable