Skip to content
Snippets Groups Projects
Commit 84409528 authored by stepan's avatar stepan
Browse files

Enable passing tests

parent 9a63b3cc
No related branches found
No related tags found
No related merge requests found
......@@ -9246,7 +9246,7 @@ $bg
#argv <- list(c(NA, NaN), 'logical'); .Internal(as.vector(argv[[1]], argv[[2]]))
[1] NA NA
 
##com.oracle.truffle.r.test.builtins.TestBuiltin_asvector.testasvector41#Ignored.ImplementationError#
##com.oracle.truffle.r.test.builtins.TestBuiltin_asvector.testasvector41#
#argv <- list(structure(list(`character(0)` = structure(integer(0), .Label = character(0), class = 'factor')), .Names = 'character(0)', row.names = character(0), class = 'data.frame'), 'pairlist'); .Internal(as.vector(argv[[1]], argv[[2]]))
[1] character(0)
<0 rows> (or 0-length row.names)
......@@ -9795,7 +9795,7 @@ Error in detach("string") : invalid 'name' argument
#x <- c(1, 3); attr(x, 'abc') <- 42; attr(x, 'ab', exact=TRUE)
NULL
 
##com.oracle.truffle.r.test.builtins.TestBuiltin_attr.testExactMatch#Ignored.Unimplemented#
##com.oracle.truffle.r.test.builtins.TestBuiltin_attr.testExactMatch#
#x <- c(1,2); attr(x, 'row.namess') <- 42; attr(x, 'row.names')
[1] 42
 
......@@ -36831,7 +36831,7 @@ In print.default("Work dir: ", getwd()) : NAs introduced by coercion
#argv <- list('mgcv', NULL, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE); .Internal(list.files(argv[[1]], argv[[2]], argv[[3]], argv[[4]], argv[[5]], argv[[6]], argv[[7]], argv[[8]]))
character(0)
 
##com.oracle.truffle.r.test.builtins.TestBuiltin_lm.test#Ignored.ImplementationError#
##com.oracle.truffle.r.test.builtins.TestBuiltin_lm.test#
#require(stats); lm(data = structure(list(y = c(43, 63, 71, 61, 81, 43, 58, 71, 72, 67, 64, 67, 69, 68, 77, 81, 74, 65, 65, 50, 50, 64, 53, 40, 63, 66, 82), x1 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), x2 = c(51, 64, 70, 63, 78, 55, 67, 75, 82, 61, 53, 60, 62, 83, 77, 90, 85, 60, 70, 58, 40, 61, 66, 37, 54, 77, 82), x3 = c(30, 51, 68, 45, 56, 49, 42, 50, 72, 45, 53, 47, 57, 83, 54, 50, 64, 65, 46, 68, 33, 52, 52, 42, 42, 66, 39), x4 = c(47, 45, 48, 39, 57, 69, 66, 50, 59, 45, 72, 50, 59, 44, 75, 39, 45, 62, 47, 74, 75, 67, 47, 58, 54, 66, 62), x5 = c(61, 63, 76, 54, 71, 54, 66, 70, 71, 62, 58, 59, 55, 59, 79, 60, 79, 55, 75, 64, 43, 66, 63, 50, 66, 88, 64), x6 = c(92, 73, 86, 84, 83, 49, 68, 66, 83, 80, 67, 74, 63, 77, 77, 54, 79, 80, 85, 78, 64, 80, 80, 57, 75, 76, 78), x7 = c(45, 47, 48, 35, 47, 34, 35, 41, 31, 41, 34, 41, 25, 35, 46, 36, 63, 60, 46, 52, 33, 41, 37, 49, 33, 72, 39)), .Names = c('y', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7'), row.names = c('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '30'), class = 'data.frame'), formula = y ~ . + 0)
 
Call:
......@@ -40704,7 +40704,7 @@ In mean.default(x = c(2L, 1L, 2L, 2L)) :
#argv <- structure(list(x = structure(1412795929.08562, class = c('POSIXct', 'POSIXt'))), .Names = 'x');do.call('mean.POSIXct', argv)
[1] "2014-10-08 19:18:49 GMT"
 
##com.oracle.truffle.r.test.builtins.TestBuiltin_meandefault.testmeandefault1#Output.IgnoreWarningContext#
##com.oracle.truffle.r.test.builtins.TestBuiltin_meandefault.testmeandefault1#
#argv <- structure(list(x = structure(c(2L, 1L, 2L, 2L), .Label = c('FALSE', 'TRUE'), class = 'factor')), .Names = 'x');do.call('mean.default', argv)
[1] NA
Warning message:
......@@ -83965,7 +83965,7 @@ Error in unknownSymbol() : could not find function "unknownSymbol"
foo
<msg>[1] 123
 
##com.oracle.truffle.r.test.library.base.TestConditionHandling.testWithCallingHandlers#Ignored.ImplementationError#
##com.oracle.truffle.r.test.library.base.TestConditionHandling.testWithCallingHandlers#
#withCallingHandlers({warning("foo");123L},<<<NEWLINE>>> warning=function(e) {<<<NEWLINE>>> cat("<warn>")<<<NEWLINE>>> invokeRestart("muffleWarning")<<<NEWLINE>>> })
<warn>[1] 123
 
......@@ -168603,7 +168603,7 @@ debug at #1: print(x)
[1] 5
exiting from: f(5)
 
##com.oracle.truffle.r.test.library.utils.TestInteractiveDebug.testPromise#Ignored.Unknown#
##com.oracle.truffle.r.test.library.utils.TestInteractiveDebug.testPromise#
#fun <- function(x) { cat({ cat(x); cat('<<<NEWLINE>>>') }) }; debug(fun); fun(3)<<<NEWLINE>>><<<NEWLINE>>><<<NEWLINE>>><<<NEWLINE>>><<<NEWLINE>>>
debugging in: fun(3)
debug at #1: {
......@@ -240,8 +240,7 @@ public class TestBuiltin_asvector extends TestRBase {
// FastR output: $`character(0)`
// factor(0)
// Levels:
assertEval(Ignored.ImplementationError,
"argv <- list(structure(list(`character(0)` = structure(integer(0), .Label = character(0), class = 'factor')), .Names = 'character(0)', row.names = character(0), class = 'data.frame'), 'pairlist'); .Internal(as.vector(argv[[1]], argv[[2]]))");
assertEval("argv <- list(structure(list(`character(0)` = structure(integer(0), .Label = character(0), class = 'factor')), .Names = 'character(0)', row.names = character(0), class = 'data.frame'), 'pairlist'); .Internal(as.vector(argv[[1]], argv[[2]]))");
}
@Test
......
......@@ -4,7 +4,7 @@
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Copyright (c) 2014, Purdue University
* Copyright (c) 2014, 2017, Oracle and/or its affiliates
* Copyright (c) 2014, 2018, Oracle and/or its affiliates
*
* All rights reserved.
*/
......@@ -241,7 +241,7 @@ public class TestBuiltin_attr extends TestBase {
@Test
public void testExactMatch() {
assertEval("x <- c(1, 3); attr(x, 'abc') <- 42; attr(x, 'ab', exact=TRUE)");
assertEval(Ignored.Unimplemented, "x <- c(1,2); attr(x, 'row.namess') <- 42; attr(x, 'row.names')");
assertEval("x <- c(1,2); attr(x, 'row.namess') <- 42; attr(x, 'row.names')");
}
@Test
......
......@@ -4,7 +4,7 @@
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Copyright (c) 2014, Purdue University
* Copyright (c) 2014, 2017, Oracle and/or its affiliates
* Copyright (c) 2014, 2018, Oracle and/or its affiliates
*
* All rights reserved.
*/
......@@ -72,7 +72,6 @@ public class TestBuiltin_lm extends TestBase {
@Test
public void test() {
// FIXME test causes StackOverflow
assertEval(Ignored.ImplementationError,
"require(stats); lm(data = structure(list(y = c(43, 63, 71, 61, 81, 43, 58, 71, 72, 67, 64, 67, 69, 68, 77, 81, 74, 65, 65, 50, 50, 64, 53, 40, 63, 66, 82), x1 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), x2 = c(51, 64, 70, 63, 78, 55, 67, 75, 82, 61, 53, 60, 62, 83, 77, 90, 85, 60, 70, 58, 40, 61, 66, 37, 54, 77, 82), x3 = c(30, 51, 68, 45, 56, 49, 42, 50, 72, 45, 53, 47, 57, 83, 54, 50, 64, 65, 46, 68, 33, 52, 52, 42, 42, 66, 39), x4 = c(47, 45, 48, 39, 57, 69, 66, 50, 59, 45, 72, 50, 59, 44, 75, 39, 45, 62, 47, 74, 75, 67, 47, 58, 54, 66, 62), x5 = c(61, 63, 76, 54, 71, 54, 66, 70, 71, 62, 58, 59, 55, 59, 79, 60, 79, 55, 75, 64, 43, 66, 63, 50, 66, 88, 64), x6 = c(92, 73, 86, 84, 83, 49, 68, 66, 83, 80, 67, 74, 63, 77, 77, 54, 79, 80, 85, 78, 64, 80, 80, 57, 75, 76, 78), x7 = c(45, 47, 48, 35, 47, 34, 35, 41, 31, 41, 34, 41, 25, 35, 46, 36, 63, 60, 46, 52, 33, 41, 37, 49, 33, 72, 39)), .Names = c('y', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7'), row.names = c('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '30'), class = 'data.frame'), formula = y ~ . + 0)");
assertEval("require(stats); lm(data = structure(list(y = c(43, 63, 71, 61, 81, 43, 58, 71, 72, 67, 64, 67, 69, 68, 77, 81, 74, 65, 65, 50, 50, 64, 53, 40, 63, 66, 82), x1 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), x2 = c(51, 64, 70, 63, 78, 55, 67, 75, 82, 61, 53, 60, 62, 83, 77, 90, 85, 60, 70, 58, 40, 61, 66, 37, 54, 77, 82), x3 = c(30, 51, 68, 45, 56, 49, 42, 50, 72, 45, 53, 47, 57, 83, 54, 50, 64, 65, 46, 68, 33, 52, 52, 42, 42, 66, 39), x4 = c(47, 45, 48, 39, 57, 69, 66, 50, 59, 45, 72, 50, 59, 44, 75, 39, 45, 62, 47, 74, 75, 67, 47, 58, 54, 66, 62), x5 = c(61, 63, 76, 54, 71, 54, 66, 70, 71, 62, 58, 59, 55, 59, 79, 60, 79, 55, 75, 64, 43, 66, 63, 50, 66, 88, 64), x6 = c(92, 73, 86, 84, 83, 49, 68, 66, 83, 80, 67, 74, 63, 77, 77, 54, 79, 80, 85, 78, 64, 80, 80, 57, 75, 76, 78), x7 = c(45, 47, 48, 35, 47, 34, 35, 41, 31, 41, 34, 41, 25, 35, 46, 36, 63, 60, 46, 52, 33, 41, 37, 49, 33, 72, 39)), .Names = c('y', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7'), row.names = c('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '30'), class = 'data.frame'), formula = y ~ . + 0)");
}
}
......@@ -4,7 +4,7 @@
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Copyright (c) 2014, Purdue University
* Copyright (c) 2014, 2016, Oracle and/or its affiliates
* Copyright (c) 2014, 2018, Oracle and/or its affiliates
*
* All rights reserved.
*/
......@@ -20,7 +20,6 @@ public class TestBuiltin_meandefault extends TestBase {
@Test
public void testmeandefault1() {
assertEval(Output.IgnoreWarningContext,
"argv <- structure(list(x = structure(c(2L, 1L, 2L, 2L), .Label = c('FALSE', 'TRUE'), class = 'factor')), .Names = 'x');do.call('mean.default', argv)");
assertEval("argv <- structure(list(x = structure(c(2L, 1L, 2L, 2L), .Label = c('FALSE', 'TRUE'), class = 'factor')), .Names = 'x');do.call('mean.default', argv)");
}
}
......@@ -74,7 +74,7 @@ public class TestConditionHandling extends TestRBase {
@Test
public void testWithCallingHandlers() {
assertEval(Output.IgnoreWarningContext, "withCallingHandlers({warning(\"foo\");123L},\n warning=function(e) {cat(\"<warn>\")})");
assertEval(Ignored.ImplementationError, "withCallingHandlers({warning(\"foo\");123L},\n warning=function(e) {\n cat(\"<warn>\")\n invokeRestart(\"muffleWarning\")\n })");
assertEval("withCallingHandlers({warning(\"foo\");123L},\n warning=function(e) {\n cat(\"<warn>\")\n invokeRestart(\"muffleWarning\")\n })");
assertEval("withCallingHandlers({message(\"foo\");123L},\n message=function(e) {cat(\"<msg>\")})");
assertEval("withCallingHandlers({message(\"foo\");123L},\n message=function(e) {\n cat(\"<msg>\")\n invokeRestart(\"muffleMessage\")\n })");
assertEval("withCallingHandlers({message(\"foo\");packageStartupMessage(\"bar\");123L},\n packageStartupMessage=function(e) {\n cat(\"<msg>\")\n invokeRestart(\"muffleMessage\")\n })");
......
......@@ -79,8 +79,7 @@ public class TestInteractiveDebug extends TestBase {
@Test
public void testPromise() {
// TODO test fails for unknown reason; the snippet runs correctly if used in REPL
assertEval(Ignored.Unknown, "fun <- function(x) { cat({ cat(x); cat('\n') }) }; debug(fun); fun(3)\n\n\n\n\n");
assertEval("fun <- function(x) { cat({ cat(x); cat('\n') }) }; debug(fun); fun(3)\n\n\n\n\n");
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment