summaryrefslogtreecommitdiffstats
path: root/misc/rosetta/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'misc/rosetta/src/test')
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromJSON.java12
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java14
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java2
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Ladder.java12
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_RosettaDF.java4
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Saved.java2
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Struct.java2
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Types.java22
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/OutDump.java6
-rw-r--r--misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/Report.java4
10 files changed, 40 insertions, 40 deletions
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromJSON.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromJSON.java
index 3e12f594..67565122 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromJSON.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromJSON.java
@@ -90,7 +90,7 @@ public class JU_FromJSON {
tt.done();
}
report.glean(trans,Env.JSON);
- } while(report.go());
+ } while (report.go());
String result = sbw.toString();
System.out.println(result);
@@ -120,7 +120,7 @@ public class JU_FromJSON {
tt.done();
}
report.glean(trans,Env.JSON);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
@@ -147,7 +147,7 @@ public class JU_FromJSON {
tt.done();
}
report.glean(trans,Env.JSON);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
@@ -175,7 +175,7 @@ public class JU_FromJSON {
tt.done();
}
report.glean(trans,Env.JSON);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
@@ -218,7 +218,7 @@ public class JU_FromJSON {
tt.done();
}
report.glean(trans,Env.XML);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
@@ -260,7 +260,7 @@ public class JU_FromJSON {
tt.done();
}
report.glean(trans,Env.XML);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java
index 2a4e3d2d..4fefe622 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_FromXML.java
@@ -100,7 +100,7 @@ public class JU_FromXML {
tt.done();
}
report.glean(trans,Env.XML);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
@@ -127,7 +127,7 @@ public class JU_FromXML {
tt.done();
}
report.glean(trans,Env.XML);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
@@ -136,7 +136,7 @@ public class JU_FromXML {
@Test
public void warmup() throws Exception {
- if(ITERATIONS>20) {
+ if (ITERATIONS>20) {
System.out.println("*** Warmup JAXB ***");
JAXBumar jaxbUmar = new JAXBumar(LargerData.class);
@@ -170,7 +170,7 @@ public class JU_FromXML {
all.done();
}
report.glean(trans,Env.XML);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
@@ -209,7 +209,7 @@ public class JU_FromXML {
all.done();
}
report.glean(trans,Env.XML);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString()); }
@@ -225,7 +225,7 @@ public class JU_FromXML {
Trans trans = EnvFactory.newTrans();
LargerData ld;
- for(int i=0;i<ITERATIONS;++i) {
+ for (int i=0;i<ITERATIONS;++i) {
sbw.reset();
TimeTaken all = trans.start("Combo", Env.SUB);
try {
@@ -247,7 +247,7 @@ public class JU_FromXML {
}
sbw.append('\n');
Metric m;
- if(ITERATIONS>20) {
+ if (ITERATIONS>20) {
m = trans.auditTrail(0,null);
} else {
m = trans.auditTrail(0, sbw.getBuffer());
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java
index 9ab06e7c..af58ea57 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_JSON.java
@@ -123,7 +123,7 @@ public class JU_JSON {
System.out.println(sw);
String result = sw.toString();
- if(!result.equals(cmp)) {
+ if (!result.equals(cmp)) {
sw.getBuffer().setLength(0);
new OutRaw().extract(new StringReader(str), sw, in);
System.out.println(sw);
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Ladder.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Ladder.java
index 229f1bf4..fd6142b1 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Ladder.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Ladder.java
@@ -32,22 +32,22 @@ public class JU_Ladder {
public void test() {
Ladder<String> ladder = new Ladder<String>();
- for(int i=0;i<30;++i) {
- for(int j=0;j<i;++j)ladder.ascend();
+ for (int i=0;i<30;++i) {
+ for (int j=0;j<i;++j)ladder.ascend();
String str = "Rung " + i;
assertEquals(ladder.peek(),null);
ladder.push(str);
assertEquals(str,ladder.peek());
assertEquals(str,ladder.pop());
assertEquals(null,ladder.peek());
- for(int j=0;j<i;++j)ladder.descend();
+ for (int j=0;j<i;++j)ladder.descend();
}
assertEquals(ladder.height(),32); // Sizing, when naturally created is by 8
ladder.cutTo(8);
assertEquals(ladder.height(),8);
- for(int i=0;i<30;++i) {
+ for (int i=0;i<30;++i) {
ladder.jumpTo(i);
String str = "Rung " + i;
assertEquals(ladder.peek(),null);
@@ -57,7 +57,7 @@ public class JU_Ladder {
ladder.bottom();
- for(int i=0;i<30;++i) {
+ for (int i=0;i<30;++i) {
assertEquals("Rung " + i,ladder.peek());
ladder.ascend();
}
@@ -66,7 +66,7 @@ public class JU_Ladder {
ladder.top();
assertEquals("Rung 29",ladder.peek());
- for(int i=0;i<30;++i) {
+ for (int i=0;i<30;++i) {
ladder.jumpTo(i);
assertEquals("Rung " + i,ladder.peek());
}
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_RosettaDF.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_RosettaDF.java
index 1a5f86f3..ccc29317 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_RosettaDF.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_RosettaDF.java
@@ -95,7 +95,7 @@ public class JU_RosettaDF {
tt.done();
}
report.glean(trans, 1,2,3,4,5);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw);
@@ -117,7 +117,7 @@ public class JU_RosettaDF {
RosettaData<?> data = df.newData(trans).in(Data.TYPE.JSON).out(Data.TYPE.XML);
data.direct(new StringReader(JU_FromJSON.str), sbw);
report.glean(trans);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw);
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Saved.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Saved.java
index de1b5500..a0847f4c 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Saved.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Saved.java
@@ -95,7 +95,7 @@ public class JU_Saved<b> {
tt.done();
}
report.glean(trans,1,2,3,4);
- } while(report.go());
+ } while (report.go());
report.report(sbw);
System.out.println(sbw.toString());
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Struct.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Struct.java
index 7e767e5d..40c41596 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Struct.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Struct.java
@@ -57,7 +57,7 @@ public class JU_Struct {
// Setter<SampleData> setter = jaxSet.setter("id");
// setter.set(sd, "Your ID");
//
-// for(Entry<String, Getter<SampleData>> es : jaxSet.getters()) {
+// for (Entry<String, Getter<SampleData>> es : jaxSet.getters()) {
// System.out.print(es.getKey());
// System.out.print(' ');
// System.out.println(es.getValue().get(sd));
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Types.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Types.java
index 032f9f1c..2aca5f52 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Types.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/JU_Types.java
@@ -120,9 +120,9 @@ public class JU_Types {
Multi multi = new Multi();
MultiMarshal pmulti = new MultiMarshal();
- for(int i=0;i<10;++i) {
+ for (int i=0;i<10;++i) {
System.out.println("===== Multi Iteration " + i + " =====");
- if(i>0) {
+ if (i>0) {
multi.getSingle().add(setSData());
}
System.out.println(" ===== RAW =====");
@@ -151,9 +151,9 @@ public class JU_Types {
Multi multi = new Multi();
DocMarshal<Multi> doc = DocMarshal.root(new MultiMarshal());
- for(int i=0;i<3;++i) {
+ for (int i=0;i<3;++i) {
System.out.println("===== Multi Iteration " + i + " =====");
- if(i>0) {
+ if (i>0) {
multi.getSingle().add(setSData());
}
System.out.println(" ===== RAW =====");
@@ -194,14 +194,14 @@ public class JU_Types {
Trans trans = env.newTrans();
RosettaData<Multi> data = df.newData(trans);
// Prime pump
- for(int i=0;i<100;++i) {
+ for (int i=0;i<100;++i) {
data.load(multi);
}
trans = env.newTrans();
data = df.newData(trans);
int iters = 10000;
- for(int i=0;i<iters;++i) {
+ for (int i=0;i<iters;++i) {
data.load(multi);
}
Metric metrics = trans.auditTrail(0, null,Env.JSON,Env.XML);
@@ -215,13 +215,13 @@ public class JU_Types {
data = df.newData(trans);
// Prime pump
- for(int i=0;i<100;++i) {
+ for (int i=0;i<100;++i) {
data.load(multi);
}
trans = env.newTrans();
data = df.newData(trans);
- for(int i=0;i<iters;++i) {
+ for (int i=0;i<iters;++i) {
data.load(multi);
}
metrics = trans.auditTrail(0, null,Env.JSON,Env.XML);
@@ -235,14 +235,14 @@ public class JU_Types {
data = df.newData(trans);
StringBuilderWriter sbw = new StringBuilderWriter(256);
// Prime pump
- for(int i=0;i<100;++i) {
+ for (int i=0;i<100;++i) {
sbw.reset();
data.direct(multi, sbw, true);
}
trans = env.newTrans();
data = df.newData(trans);
- for(int i=0;i<iters;++i) {
+ for (int i=0;i<iters;++i) {
sbw.reset();
data.direct(multi, sbw, true);
}
@@ -287,7 +287,7 @@ public class JU_Types {
System.out.println(sw);
String result = sw.toString();
- if(!result.equals(str)) {
+ if (!result.equals(str)) {
sw.getBuffer().setLength(0);
new OutRaw().extract(new StringReader(str), sw, in);
System.out.println(sw);
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/OutDump.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/OutDump.java
index 6ebd07a3..7e230822 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/OutDump.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/OutDump.java
@@ -38,7 +38,7 @@ public class OutDump extends Out{
Parsed<S> p = prs.newParsed();
- while((p = prs.parse(in,p.reuse())).valid()) {
+ while ((p = prs.parse(in,p.reuse())).valid()) {
switch(p.event) {
case Parse.START_OBJ:
ipw.append("Start Object ");
@@ -71,9 +71,9 @@ public class OutDump extends Out{
}
private void printData(IndentPrintWriter ipw, Parsed<?> parsed) {
- if(parsed.hasData()) {
+ if (parsed.hasData()) {
ipw.append("Data:[");
- if(parsed.hasName()) {
+ if (parsed.hasName()) {
ipw.append(parsed.name);
ipw.append(" : ");
}
diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/Report.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/Report.java
index df4fec07..acb33010 100644
--- a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/Report.java
+++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/test/Report.java
@@ -46,7 +46,7 @@ public class Report {
Metric m = trans.auditTrail(0, null, type);
total+=m.total;
int min = Math.min(buckets.length, m.buckets.length);
- for(int b=0;b<min;++b) {
+ for (int b=0;b<min;++b) {
buckets[b]+=m.buckets[b];
}
}
@@ -59,7 +59,7 @@ public class Report {
public void report(Writer sbw) throws IOException {
sbw.append("\n"+count + " entries, Total Time: " + total + "ms, Avg Time: " + total/count + "ms\n");
int min = Math.min(buckets.length, names.length);
- for(int i=0;i<min;++i) {
+ for (int i=0;i<min;++i) {
sbw.append(" Time: " + names[i] + ' ' + buckets[i] + "ms, Avg Time: " + buckets[i]/count + "ms\n");
}