aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsundar <none@none>2014-03-17 18:02:00 +0530
committersundar <none@none>2014-03-17 18:02:00 +0530
commit309992a1f232250da32a00eac20fbca68074de2f (patch)
tree4bf92bf406355a7a6eecb4896b4fc5a962528ec6 /test
parent9db7d06dafe2803da9e839eea27e30e9464bc58f (diff)
downloadnashorn-309992a1f232250da32a00eac20fbca68074de2f.tar.gz
8037400: Remove getInitialMap getters and GlobalObject interface
Reviewed-by: lagergren, jlaskey, attila
Diffstat (limited to 'test')
-rw-r--r--test/src/jdk/nashorn/internal/codegen/CompilerTest.java5
-rw-r--r--test/src/jdk/nashorn/internal/performance/PerformanceWrapper.java4
-rw-r--r--test/src/jdk/nashorn/internal/runtime/ContextTest.java5
-rw-r--r--test/src/jdk/nashorn/internal/test/framework/SharedContextEvaluator.java6
4 files changed, 11 insertions, 9 deletions
diff --git a/test/src/jdk/nashorn/internal/codegen/CompilerTest.java b/test/src/jdk/nashorn/internal/codegen/CompilerTest.java
index 00d79acb..ac438101 100644
--- a/test/src/jdk/nashorn/internal/codegen/CompilerTest.java
+++ b/test/src/jdk/nashorn/internal/codegen/CompilerTest.java
@@ -28,6 +28,7 @@ package jdk.nashorn.internal.codegen;
import java.io.File;
import java.io.PrintWriter;
import java.io.StringWriter;
+import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ErrorManager;
import jdk.nashorn.internal.runtime.ScriptFunction;
@@ -58,7 +59,7 @@ public class CompilerTest {
}
private Context context;
- private ScriptObject global;
+ private Global global;
@BeforeClass
public void setupTest() {
@@ -146,7 +147,7 @@ public class CompilerTest {
log("Begin compiling " + file.getAbsolutePath());
}
- final ScriptObject oldGlobal = Context.getGlobal();
+ final Global oldGlobal = Context.getGlobal();
final boolean globalChanged = (oldGlobal != global);
try {
diff --git a/test/src/jdk/nashorn/internal/performance/PerformanceWrapper.java b/test/src/jdk/nashorn/internal/performance/PerformanceWrapper.java
index 999f6fa4..ce969210 100644
--- a/test/src/jdk/nashorn/internal/performance/PerformanceWrapper.java
+++ b/test/src/jdk/nashorn/internal/performance/PerformanceWrapper.java
@@ -31,9 +31,9 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ScriptFunction;
-import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
/**
@@ -89,7 +89,7 @@ public class PerformanceWrapper extends jdk.nashorn.tools.Shell {
@Override
protected Object apply(final ScriptFunction target, final Object self) {
if (_runsPerIteration == 0 && _numberOfIterations == 0) {
- final ScriptObject global = jdk.nashorn.internal.runtime.Context.getGlobal();
+ final Global global = jdk.nashorn.internal.runtime.Context.getGlobal();
final ScriptFunction _target = target;
final Object _self = self;
diff --git a/test/src/jdk/nashorn/internal/runtime/ContextTest.java b/test/src/jdk/nashorn/internal/runtime/ContextTest.java
index 1b21c23f..1ec41695 100644
--- a/test/src/jdk/nashorn/internal/runtime/ContextTest.java
+++ b/test/src/jdk/nashorn/internal/runtime/ContextTest.java
@@ -29,6 +29,7 @@ import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import java.util.Map;
+import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.runtime.options.Options;
import org.testng.annotations.Test;
@@ -45,7 +46,7 @@ public class ContextTest {
final Options options = new Options("");
final ErrorManager errors = new ErrorManager();
final Context cx = new Context(options, errors, Thread.currentThread().getContextClassLoader());
- final ScriptObject oldGlobal = Context.getGlobal();
+ final Global oldGlobal = Context.getGlobal();
Context.setGlobal(cx.createGlobal());
try {
String code = "22 + 10";
@@ -65,7 +66,7 @@ public class ContextTest {
final ErrorManager errors = new ErrorManager();
final Context cx = new Context(options, errors, Thread.currentThread().getContextClassLoader());
final boolean strict = cx.getEnv()._strict;
- final ScriptObject oldGlobal = Context.getGlobal();
+ final Global oldGlobal = Context.getGlobal();
Context.setGlobal(cx.createGlobal());
try {
diff --git a/test/src/jdk/nashorn/internal/test/framework/SharedContextEvaluator.java b/test/src/jdk/nashorn/internal/test/framework/SharedContextEvaluator.java
index ac2dc172..83d057f3 100644
--- a/test/src/jdk/nashorn/internal/test/framework/SharedContextEvaluator.java
+++ b/test/src/jdk/nashorn/internal/test/framework/SharedContextEvaluator.java
@@ -34,10 +34,10 @@ import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import jdk.nashorn.api.scripting.NashornException;
+import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ErrorManager;
import jdk.nashorn.internal.runtime.ScriptFunction;
-import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.Source;
import jdk.nashorn.internal.runtime.options.Options;
@@ -110,12 +110,12 @@ public final class SharedContextEvaluator implements ScriptEvaluator {
@Override
public int run(final OutputStream out, final OutputStream err, final String[] args) throws IOException {
- final ScriptObject oldGlobal = Context.getGlobal();
+ final Global oldGlobal = Context.getGlobal();
try {
ctxOut.setDelegatee(out);
ctxErr.setDelegatee(err);
final ErrorManager errors = context.getErrorManager();
- final ScriptObject global = context.createGlobal();
+ final Global global = context.createGlobal();
Context.setGlobal(global);
// For each file on the command line.