From b4e8c6e38dcc22f54bd9ab3aab18cef11e35c5ad Mon Sep 17 00:00:00 2001 From: Yaroslav Lepenkin Date: Fri, 3 Jul 2015 14:56:46 +0300 Subject: [PATCH] Reformat with context on postponed formatting: fixed groovy test data --- .../ExtractClosureTest.groovy | 18 +++++++++--------- .../GrIntroduceParameterInClosureTest.groovy | 2 +- .../refactoring/introduceVariable/clos1.test | 2 +- .../refactoring/introduceVariable/clos2.test | 4 ++-- .../refactoring/introduceVariable/clos3.test | 4 ++-- .../refactoring/introduceVariable/clos4.test | 2 +- .../refactoring/introduceVariable/if2.test | 2 +- .../groovy/testdata/paramToMap/closure1/A.test | 2 +- .../testdata/paramToMap/secondClosure/A.test | 2 +- .../ClosureCall_after.groovy | 2 +- .../ClosureRefWithoutCall_after.groovy | 2 +- .../CorrectOccurrencesForLocalVar_after.groovy | 2 +- .../LocalVarUsage_after.groovy | 2 +- .../RemoveUnusedParam_after.groovy | 2 +- .../VarAssignedToClosure_after.groovy | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/ExtractClosureTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/ExtractClosureTest.groovy index 2f6b96a13ffa..61296348c617 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/ExtractClosureTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/ExtractClosureTest.groovy @@ -322,7 +322,7 @@ def foo = {String s -> foo('a') ''', ''' -def foo = {String s, Closure closure -> +def foo = { String s, Closure closure -> s+=2 closure(s) } @@ -342,7 +342,7 @@ class X { new X().foo('a') ''', ''' class X { - def foo = {Closure closure -> + def foo = { Closure closure -> closure() } } @@ -362,7 +362,7 @@ def foo = {String s -> foo('a') ''', ''' -def foo = {Closure closure -> +def foo = { Closure closure -> closure() } @@ -386,7 +386,7 @@ class X { new X().foo('a') ''', ''' class X { - def foo = {Closure closure -> + def foo = { Closure closure -> closure() } def bar(){} @@ -407,7 +407,7 @@ def foo = {int x, int y -> foo(2, 3) ''', ''' -def foo = {Closure closure -> +def foo = { Closure closure -> int a = 5 closure(a) } @@ -430,7 +430,7 @@ def adventure = { adventure() ''', ''' -def adventure = {Closure closure -> +def adventure = { Closure closure -> try { closure() @@ -463,7 +463,7 @@ def killMonsters(){2} def collectLoot(){3} def becomeTownGuard(){} ''', ''' -def adventure = {Closure closure -> +def adventure = { Closure closure -> try { def skill = closure() } catch (ArrowToKneeException e) { @@ -499,7 +499,7 @@ class Some { private static int smth = 1 private static void doSmth() {} - void m1 = {Closure closure -> + void m1 = { Closure closure -> closure() } @@ -520,7 +520,7 @@ void foo = { } foo() ''', ''' -void foo = {Closure closure -> +void foo = { Closure closure -> def s = closure() } foo { return "zxcvbn".substring(2).charAt(1) } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/GrIntroduceParameterInClosureTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/GrIntroduceParameterInClosureTest.groovy index ec2e47ef89a3..51fe31023c51 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/GrIntroduceParameterInClosureTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/introduceParameter/GrIntroduceParameterInClosureTest.groovy @@ -121,7 +121,7 @@ def cl = { } cl() ''', '''\ -def cl = {String anObject -> +def cl = { String anObject -> print 'a' + anObject + 'c' } cl('b') diff --git a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos1.test b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos1.test index b780c9e7c9fa..87a18b1e8afe 100644 --- a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos1.test +++ b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos1.test @@ -1,4 +1,4 @@ foo(1, 2, 3) {x->x} ----- -def preved = {x->x} +def preved = { x->x} foo(1, 2, 3, preved) \ No newline at end of file diff --git a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos2.test b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos2.test index a7ab0feac6b0..186af1c41d04 100644 --- a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos2.test +++ b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos2.test @@ -1,4 +1,4 @@ foo(1, 2, 3) {x -> x} {x -> y} {x->x} {x -> z} ----- -def preved = {x->x} -foo(1, 2, 3, preved, { x -> y }, preved) {x -> z} \ No newline at end of file +def preved = { x->x} +foo(1, 2, 3, preved, { x -> y }, preved) { x -> z} \ No newline at end of file diff --git a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos3.test b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos3.test index abf74cecb738..c1484bdae20a 100644 --- a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos3.test +++ b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos3.test @@ -1,4 +1,4 @@ foo(1, 2, 3) {x -> x} {x -> y} {x->x} {x -> z} ----- -def preved = {x->x} -foo(1, 2, 3, { x -> x }, { x -> y }, preved) {x -> z} \ No newline at end of file +def preved = { x->x} +foo(1, 2, 3, { x -> x }, { x -> y }, preved) { x -> z} \ No newline at end of file diff --git a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos4.test b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos4.test index be1a432b697a..6af873aa3377 100644 --- a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos4.test +++ b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/clos4.test @@ -2,5 +2,5 @@ foo {x->x} {x->x} {x->x} (3) {x->x} ----- -def preved = {x->x} +def preved = { x->x} foo(preved, preved, preved)(3, preved) diff --git a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/if2.test b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/if2.test index 7d206eb43bfd..8d72bf175856 100644 --- a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/if2.test +++ b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/if2.test @@ -1,5 +1,5 @@ {x->x} if (true) ({x->x}) ----- -def preved = {x->x} +def preved = { x->x} if (true) preved \ No newline at end of file diff --git a/plugins/groovy/testdata/paramToMap/closure1/A.test b/plugins/groovy/testdata/paramToMap/closure1/A.test index de99aa1b077e..ebad5355fdc6 100644 --- a/plugins/groovy/testdata/paramToMap/closure1/A.test +++ b/plugins/groovy/testdata/paramToMap/closure1/A.test @@ -1,4 +1,4 @@ -def foo = {Map params, jjj -> +def foo = { Map params, jjj -> println params.iii } diff --git a/plugins/groovy/testdata/paramToMap/secondClosure/A.test b/plugins/groovy/testdata/paramToMap/secondClosure/A.test index eb3ff57c616a..25e61f3bf579 100644 --- a/plugins/groovy/testdata/paramToMap/secondClosure/A.test +++ b/plugins/groovy/testdata/paramToMap/secondClosure/A.test @@ -3,4 +3,4 @@ def foo = { Map attrs, cl1 -> attrs.cl2.call() } -foo(cl2: { y -> y }) {x->x} \ No newline at end of file +foo(cl2: { y -> y }) { x->x} \ No newline at end of file diff --git a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureCall_after.groovy b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureCall_after.groovy index 91115445f8a3..609314d0918c 100644 --- a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureCall_after.groovy +++ b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureCall_after.groovy @@ -1,2 +1,2 @@ -Closure clos = {String anObject -> println anObject } +Closure clos = { String anObject -> println anObject } if ([1, 2, 3].length()>1) {clos.call("test")} \ No newline at end of file diff --git a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureRefWithoutCall_after.groovy b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureRefWithoutCall_after.groovy index b39d89b51042..fec59ffb31b7 100644 --- a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureRefWithoutCall_after.groovy +++ b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/ClosureRefWithoutCall_after.groovy @@ -1,2 +1,2 @@ -Closure clos = {String anObject -> println anObject } +Closure clos = { String anObject -> println anObject } [1, 2, 3].each {clos} \ No newline at end of file diff --git a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/CorrectOccurrencesForLocalVar_after.groovy b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/CorrectOccurrencesForLocalVar_after.groovy index 61d4070988c7..60ed7b954bd9 100644 --- a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/CorrectOccurrencesForLocalVar_after.groovy +++ b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/CorrectOccurrencesForLocalVar_after.groovy @@ -4,7 +4,7 @@ clos = {print "foo"} clos() clos.call() -clos = {String anObject -> print anObject } +clos = { String anObject -> print anObject } clos("foo") clos.call("foo") diff --git a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/LocalVarUsage_after.groovy b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/LocalVarUsage_after.groovy index 629f12e481f5..d5e068cf8b67 100644 --- a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/LocalVarUsage_after.groovy +++ b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/LocalVarUsage_after.groovy @@ -1,4 +1,4 @@ -def a = {int x, int anObject -> +def a = { int x, int anObject -> print x+ anObject } diff --git a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/RemoveUnusedParam_after.groovy b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/RemoveUnusedParam_after.groovy index eb46490f4b6c..4541e1fe39aa 100644 --- a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/RemoveUnusedParam_after.groovy +++ b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/RemoveUnusedParam_after.groovy @@ -1,4 +1,4 @@ -def a = {int x, int z, int anObject -> +def a = { int x, int z, int anObject -> print anObject + x+z } diff --git a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/VarAssignedToClosure_after.groovy b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/VarAssignedToClosure_after.groovy index d8e8cbe1ee8f..c14362123e87 100644 --- a/plugins/groovy/testdata/refactoring/introduceParameterInClosure/VarAssignedToClosure_after.groovy +++ b/plugins/groovy/testdata/refactoring/introduceParameterInClosure/VarAssignedToClosure_after.groovy @@ -1,4 +1,4 @@ Closure clos -clos= {String anObject -> print anObject } +clos= { String anObject -> print anObject } clos("foo") clos.call("foo")