Skip to content

Commit cfc4ff0

Browse files
author
Pavel Marek
committed
Fix style
1 parent c88d794 commit cfc4ff0

File tree

8 files changed

+25
-22
lines changed

8 files changed

+25
-22
lines changed

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_Sysgetenv.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1515
*
1616
* Copyright (c) 2012-2014, Purdue University
17-
* Copyright (c) 2013, 2020, Oracle and/or its affiliates
17+
* Copyright (c) 2013, 2021, Oracle and/or its affiliates
1818
*
1919
* All rights reserved.
2020
*/

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/FastRContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/FastRSession.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public static Source createSource(String txt, String name) {
100100
return Source.newBuilder("R", txt, name).internal(true).interactive(true).buildLiteral();
101101
}
102102

103-
// TODO: used from the outsize: can the users use the shared context? Otherwise change them to the exclusive one
103+
// TODO: used from the outsize: can the users use the shared context? Otherwise change them to
104+
// the exclusive one
104105
public FastRContext createContext(ContextKind contextKind) {
105106
return getContext(contextKind, true);
106107
}
@@ -162,7 +163,8 @@ private static FastRContext createVanillaContext(boolean isShared) {
162163
ByteArrayOutputStream output = new ByteArrayOutputStream();
163164
TestByteArrayInputStream input = new TestByteArrayInputStream();
164165
ChildContextInfo info = ChildContextInfo.create(params, null, ContextKind.SHARE_NOTHING, null, input, output, output);
165-
// TODO: do we need the config info in this case? -- we should eventually remove it altogether
166+
// TODO: do we need the config info in this case? -- we should eventually remove it
167+
// altogether
166168
RContext.childInfo = info;
167169
Context truffleContext = getContextBuilder("R", "llvm").in(input).out(output).err(output).build();
168170
if (isShared) {
@@ -221,7 +223,7 @@ public String eval(TestBase testClass, String expression, ContextKind contextKin
221223
ByteArrayOutputStream output;
222224
try (FastRContext evalContext = getContext(contextKind, allowHostAccess)) {
223225
output = evalContext.getOutput();
224-
eval(evalContext, testClass, expression, contextKind, timeout);
226+
eval(evalContext, testClass, expression, timeout);
225227
}
226228
try {
227229
return output.toString("UTF-8");
@@ -231,7 +233,7 @@ public String eval(TestBase testClass, String expression, ContextKind contextKin
231233
}
232234
}
233235

234-
private void eval(FastRContext evalContext, TestBase testClass, String expression, ContextKind contextKind, long timeout) throws Throwable {
236+
private void eval(FastRContext evalContext, TestBase testClass, String expression, long timeout) throws Throwable {
235237
try {
236238
evalContext.reset();
237239
evalContext.getInput().setContents(expression);

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/base/TestSimpleErrorHandling.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
public class TestSimpleErrorHandling extends TestBase {
3333

3434
/**
35-
* Note that 'error' option cannot be simply reset in a standard R session.
36-
* Running {@code old_opts <- options(); options(error = quote(cat('Nastala chyba\n'))); X; options(old_opts); X}
37-
* does not produce the expected result, i.e., the second error message still contains 'Nastala chyba'.
35+
* Note that 'error' option cannot be simply reset in a standard R session. Running
36+
* {@code old_opts <- options(); options(error = quote(cat('Nastala chyba\n'))); X; options(old_opts); X}
37+
* does not produce the expected result, i.e., the second error message still contains 'Nastala
38+
* chyba'.
3839
*/
3940
@Test
4041
public void testError() {

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestContextKind.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
package com.oracle.truffle.r.test.library.fastr;
2525

2626
import com.oracle.truffle.r.test.TestBase;
27-
import com.oracle.truffle.r.test.TestTrait;
28-
import org.junit.Ignore;
2927
import org.junit.Test;
3028

3129
/**

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/stats/TestRandGenerationFunctions.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.HashSet;
2727
import java.util.Set;
2828

29-
import org.junit.Ignore;
3029
import org.junit.Test;
3130

3231
import com.oracle.truffle.r.test.TestBase;
@@ -125,8 +124,10 @@ public void testGenerators() {
125124

126125
@Test
127126
public void testDotRandomSeed() {
128-
// In shared context, .Random.seed is already initialized. Therefore, all these tests are ignored.
129-
// TODO: Once the performance of non-shared context is sufficient, run these tests in non-shared context.
127+
// In shared context, .Random.seed is already initialized. Therefore, all these tests are
128+
// ignored.
129+
// TODO: Once the performance of non-shared context is sufficient, run these tests in
130+
// non-shared context.
130131
assertEval(Ignored.ImplementationError, Output.IgnoreErrorContext, "{ .Random.seed }");
131132
assertEval(Ignored.ImplementationError, Output.IgnoreErrorContext, "{ print(.Random.seed) }");
132133
assertEval(Ignored.ImplementationError, Output.IgnoreErrorContext, "{ get('.Random.seed', envir = .GlobalEnv, inherits = FALSE) }");

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/utils/TestInteractiveDebug.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ public void testPromise() {
8989
}
9090

9191
/**
92-
* FIXME: Ignored, because the shared context between unit tests does not handle debugging more functions at once
93-
* correctly.
92+
* FIXME: Ignored, because the shared context between unit tests does not handle debugging more
93+
* functions at once correctly.
9494
*/
9595
@Test
9696
@Ignore
@@ -114,7 +114,8 @@ public void testContinue() {
114114

115115
@Test
116116
public void testDebugOnce() {
117-
assertEval(TIMEOUT, Context.NonShared, Ignored.OutputFormatting, "fun0 <- function() { print('fun0') }; fun1 <- function() { print('en'); fun0(); fun0(); print('ex') }; debugonce(fun0); fun1()\nc\n");
117+
assertEval(TIMEOUT, Context.NonShared, Ignored.OutputFormatting,
118+
"fun0 <- function() { print('fun0') }; fun1 <- function() { print('en'); fun0(); fun0(); print('ex') }; debugonce(fun0); fun1()\nc\n");
118119
assertEval(TIMEOUT, Context.NonShared, Ignored.OutputFormatting, "fun0 <- function() { print('fun0') }; debugonce(fun0); fun0()\nc\n");
119120
}
120121

@@ -135,8 +136,10 @@ public void testBrowser() {
135136

136137
@Test
137138
public void testSetBreakpoint() {
138-
assertEval(TIMEOUT, Context.NonShared, Output.IgnoreDebugCallString, Output.IgnoreDebugPath, String.format("source('%s'); setBreakpoint('%s', 4, verbose=F); fun(10)\n\n\n\n\n\n\n\n", debugFile, debugFile));
139-
assertEval(TIMEOUT, Context.NonShared, String.format("source('%s'); setBreakpoint('%s', 4, verbose=F); setBreakpoint('%s', 4, verbose=F, clear=T); fun(10)\n", debugFile, debugFile, debugFile));
139+
assertEval(TIMEOUT, Context.NonShared, Output.IgnoreDebugCallString, Output.IgnoreDebugPath,
140+
String.format("source('%s'); setBreakpoint('%s', 4, verbose=F); fun(10)\n\n\n\n\n\n\n\n", debugFile, debugFile));
141+
assertEval(TIMEOUT, Context.NonShared,
142+
String.format("source('%s'); setBreakpoint('%s', 4, verbose=F); setBreakpoint('%s', 4, verbose=F, clear=T); fun(10)\n", debugFile, debugFile, debugFile));
140143
assertEval(TIMEOUT, Context.NonShared, Output.IgnoreDebugCallString, Output.IgnoreDebugPath, String.format(
141144
"source('%s'); setBreakpoint('%s', 4, verbose=F); fun(10)\n\n\n\n\n\n\n\n\nsetBreakpoint('%s', 4, verbose=F, clear=T); fun(10)\nsetBreakpoint('%s', 4, verbose=F); invisible(fun(10))\n\n\n\n\n\n\n\n\n",
142145
debugFile, debugFile, debugFile, debugFile));

com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rng/TestRRNG.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -22,13 +22,11 @@
2222
*/
2323
package com.oracle.truffle.r.test.rng;
2424

25-
import org.junit.Ignore;
2625
import org.junit.Test;
2726

2827
import com.oracle.truffle.r.test.TestBase;
2928

3029
public class TestRRNG extends TestBase {
31-
// FIXME: GR-35083
3230
@Test
3331
public void testDirectSeedAssignment() {
3432
// changes generator to MarsagliaMulticarry and sets its 2 seeds

0 commit comments

Comments
 (0)