summaryrefslogtreecommitdiff
path: root/test/696-loop/src/Main.java
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2022-11-14 14:03:10 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2022-11-15 15:34:39 +0000
commite2d1a03f24c7a130a8e5ad1c9245abe781ddb1e8 (patch)
tree99f6b917cb3b3c1ee0d7513f8b1d5f66f3884723 /test/696-loop/src/Main.java
parent07c68601ddf623a699892ed0dd5ec87b7a05fd02 (diff)
ART: Change indentation to 4 spaces in run-test shards 95-99.
Created with for testName in \ `git grep -E '^ public static void main\(String\[\]' \ -- test/*<i>-*/src/Main.java | \ sed '-es/\/src\/Main.java:.*//'`; \ do \ find $testName/ -type f -name *.java | \ xargs sed -E '-es/^(( )+)/\1\1/' --in-place ; \ done with <i> manually set to 99 down to 95 (stopping when the change is getting large). Manually address many long lines and fix other style issues. Also fix indentation in two files where https://android-review.googlesource.com/2300941 just updated previously wrong indentation. Exclude changes to test/595-profile-saving/src/Main.java because of a conflict in internal. Test: testrunner.py --host --optimizing Test: buildbot-build.sh --target Change-Id: I02fe676f3983610c0cdda1134aee2476f71bc7ce
Diffstat (limited to 'test/696-loop/src/Main.java')
-rw-r--r--test/696-loop/src/Main.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/696-loop/src/Main.java b/test/696-loop/src/Main.java
index b92166a021..9763a8e7c9 100644
--- a/test/696-loop/src/Main.java
+++ b/test/696-loop/src/Main.java
@@ -15,24 +15,24 @@
*/
public class Main {
- static int[] sA = new int[12];
- static int a = 1;
+ static int[] sA = new int[12];
+ static int a = 1;
- static void doIt(int n) {
- for (int i = 0; i < 2; i++) {
- n+=a;
+ static void doIt(int n) {
+ for (int i = 0; i < 2; i++) {
+ n += a;
+ }
+ for (int i = 0; i < n; i++) {
+ sA[i] += 1;
+ }
}
- for (int i = 0; i < n; i++) {
- sA[i] += 1;
- }
- }
- public static void main(String[] args) {
- doIt(10);
- for (int i = 0; i < sA.length; i++) {
- if (sA[i] != 1) {
- throw new Error("Expected 1, got " + sA[i]);
- }
+ public static void main(String[] args) {
+ doIt(10);
+ for (int i = 0; i < sA.length; i++) {
+ if (sA[i] != 1) {
+ throw new Error("Expected 1, got " + sA[i]);
+ }
+ }
}
- }
}