From 8e264a141944cd66e9ba179fafdfa4f51186f145 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 7 Aug 2013 21:27:44 +0400 Subject: [PATCH] Test for formatting loop parameter with explicit type --- .../formatter/LoopParameterWithExplicitType.after.kt | 5 +++++ idea/testData/formatter/LoopParameterWithExplicitType.kt | 5 +++++ .../jetbrains/jet/formatter/JetFormatterTestGenerated.java | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 idea/testData/formatter/LoopParameterWithExplicitType.after.kt create mode 100644 idea/testData/formatter/LoopParameterWithExplicitType.kt diff --git a/idea/testData/formatter/LoopParameterWithExplicitType.after.kt b/idea/testData/formatter/LoopParameterWithExplicitType.after.kt new file mode 100644 index 00000000000..0edacd52a5c --- /dev/null +++ b/idea/testData/formatter/LoopParameterWithExplicitType.after.kt @@ -0,0 +1,5 @@ +fun f(c: Array) { + for (a: Int in c) { + + } +} \ No newline at end of file diff --git a/idea/testData/formatter/LoopParameterWithExplicitType.kt b/idea/testData/formatter/LoopParameterWithExplicitType.kt new file mode 100644 index 00000000000..6d42175017c --- /dev/null +++ b/idea/testData/formatter/LoopParameterWithExplicitType.kt @@ -0,0 +1,5 @@ +fun f(c: Array) { + for (a : Int in c) { + + } +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/formatter/JetFormatterTestGenerated.java b/idea/tests/org/jetbrains/jet/formatter/JetFormatterTestGenerated.java index 3d5a6e2febf..fc88574dc6f 100644 --- a/idea/tests/org/jetbrains/jet/formatter/JetFormatterTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/formatter/JetFormatterTestGenerated.java @@ -174,6 +174,11 @@ public class JetFormatterTestGenerated extends AbstractJetFormatterTest { doTest("idea/testData/formatter/LambdaArrow.after.kt"); } + @TestMetadata("LoopParameterWithExplicitType.after.kt") + public void testLoopParameterWithExplicitType() throws Exception { + doTest("idea/testData/formatter/LoopParameterWithExplicitType.after.kt"); + } + @TestMetadata("MultilineFunctionLiteral.after.kt") public void testMultilineFunctionLiteral() throws Exception { doTest("idea/testData/formatter/MultilineFunctionLiteral.after.kt");