Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
aunkrig committed Sep 17, 2019
1 parent ed6ae2d commit 5ec8bb0
Showing 1 changed file with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.text.MessageFormat;
Expand Down Expand Up @@ -500,14 +502,6 @@ class EvaluatorTest extends CommonsCompilerTestSuite {
}
@Test public void
test64kConstantPool() throws Exception {
String preamble = (
""
+ "package test;\n"
+ "public class Test {\n"
);
final String postamble = (
"}"
);

/* == expected contant pool ==
( 0) fake entry
Expand Down Expand Up @@ -537,13 +531,16 @@ class EvaluatorTest extends CommonsCompilerTestSuite {

final String cu;
{
StringBuilder sb = new StringBuilder();
sb.append(preamble);
for (int j = 0; j < repetitions; ++j) {
sb.append("boolean _v").append(j).append(";\n");
}
sb.append(postamble);
cu = sb.toString();
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);

pw.printf("package test;%n");
pw.printf("public class Test {%n");
for (int j = 0; j < repetitions; ++j) pw.printf(" boolean _v%d;%n", j);
pw.printf("}%n");

pw.flush();
cu = sw.toString();
}

ISimpleCompiler sc = this.compilerFactory.newSimpleCompiler();
Expand Down

0 comments on commit 5ec8bb0

Please sign in to comment.