aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/java/for-each
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-04-03 13:38:53 +0100
committerMichael Williamson <mike@zwobble.org>2016-04-03 13:38:53 +0100
commit3c42c0a7c1196cc290dbcdc55dcb84379ad523e4 (patch)
treef746640db075a3d613f21581d0c392b16d024439 /src/test/resources/java/for-each
parent26f7b223ebfcf3e514ffa8c2b81ccaaa7a6605cc (diff)
C# backend: Implement for-each loops
Diffstat (limited to 'src/test/resources/java/for-each')
-rw-r--r--src/test/resources/java/for-each/com/example/ForEach.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/resources/java/for-each/com/example/ForEach.java b/src/test/resources/java/for-each/com/example/ForEach.java
new file mode 100644
index 0000000..807927d
--- /dev/null
+++ b/src/test/resources/java/for-each/com/example/ForEach.java
@@ -0,0 +1,16 @@
+package com.example;
+
+import static java.util.Arrays.asList;
+
+public class ForEach {
+ public static String value() {
+ Iterable<String> values = asList("a", "b", "c");
+ String result = "";
+
+ for (String value : values) {
+ result += value;
+ }
+
+ return result;
+ }
+}