Skip to content
Snippets Groups Projects
Commit 89928c49 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

[GR-2745] Enable passing tests.

parents 00895296 281bb4bc
No related branches found
No related tags found
No related merge requests found
......@@ -109,8 +109,7 @@ public class TestBuiltin_ascharacter extends TestBase {
@Test
public void testascharacter19() {
assertEval(Ignored.Unknown,
"argv <- list(structure(list(structure(list(given = c('George', 'E.', 'P.'), family = 'Box', role = NULL, email = NULL, comment = NULL), .Names = c('given', 'family', 'role', 'email', 'comment')), structure(list(given = c('David', 'R.'), family = 'Cox', role = NULL, email = NULL, comment = NULL), .Names = c('given', 'family', 'role', 'email', 'comment'))), class = 'person'));as.character(argv[[1]]);");
assertEval("argv <- list(structure(list(structure(list(given = c('George', 'E.', 'P.'), family = 'Box', role = NULL, email = NULL, comment = NULL), .Names = c('given', 'family', 'role', 'email', 'comment')), structure(list(given = c('David', 'R.'), family = 'Cox', role = NULL, email = NULL, comment = NULL), .Names = c('given', 'family', 'role', 'email', 'comment'))), class = 'person'));as.character(argv[[1]]);");
}
@Test
......@@ -175,7 +174,7 @@ public class TestBuiltin_ascharacter extends TestBase {
@Test
public void testascharacter32() {
assertEval(Ignored.Unknown, "argv <- list(structure(1:4, class = 'roman'));as.character(argv[[1]]);");
assertEval("argv <- list(structure(1:4, class = 'roman'));as.character(argv[[1]]);");
}
@Test
......
......@@ -107,8 +107,8 @@ public class TestBuiltin_cbind extends TestBase {
// segfault in gnur
assertEval(Ignored.ReferenceError, "{ v <- 1; class(v) <- 'foo'; cbind.foo <- length; cbind(v) }");
assertEval(Ignored.WrongCaller, "{ v <- 1; class(v) <- 'foo'; cbind.foo <- rawToBits; cbind(v) }");
assertEval(Output.IgnoreErrorContext, "{ v <- 1; class(v) <- 'foo'; cbind.foo <- rawToBits; cbind(v) }");
assertEval("{ v <- 1; class(v) <- 'foo'; cbind(v) }");
assertEval("{ v <- 1; cbind.foo <- function(...) 'foo'; cbind(v) }");
......
......@@ -610,8 +610,7 @@ public class TestBuiltin_operators extends TestBase {
@Test
public void testoperators118() {
assertEval(Ignored.Unknown,
"argv <- list(structure(c('white', 'aquamarine3', 'bisque2', 'blueviolet', 'burlywood4', 'chartreuse4', 'coral4', 'cyan3', 'darkgreen', 'darkorange1', 'aliceblue', 'white', 'white', 'white', 'white', 'chocolate', 'cornflowerblue', 'cyan4', 'darkgrey', 'darkorange2', 'antiquewhite', 'white', 'white', 'white', 'white', 'chocolate1', 'cornsilk', 'darkblue', 'darkkhaki', 'darkorange3', 'antiquewhite1', 'white', 'white', 'white', 'white', 'chocolate2', 'cornsilk1', 'darkcyan', 'darkmagenta', 'darkorange4', 'antiquewhite2', 'azure2', 'blanchedalmond', 'brown3', 'cadetblue3', 'chocolate3', 'cornsilk2', 'darkgoldenrod', 'darkolivegreen', 'darkorchid', 'antiquewhite3', 'azure3', 'blue', 'brown4', 'cadetblue4', 'chocolate4', 'cornsilk3', 'darkgoldenrod1', 'darkolivegreen1', 'darkorchid1', 'antiquewhite4', 'azure4', 'blue1', 'burlywood', 'chartreuse', 'coral', 'cornsilk4', 'darkgoldenrod2', 'darkolivegreen2', 'darkorchid2', 'aquamarine', 'beige', 'blue2', 'burlywood1', 'chartreuse1', 'coral1', 'cyan', 'darkgoldenrod3', 'darkolivegreen3', 'darkorchid3', 'aquamarine1', 'bisque', 'blue3', 'burlywood2', 'chartreuse2', 'coral2', 'cyan1', 'darkgoldenrod4', 'darkolivegreen4', 'darkorchid4', 'aquamarine2', 'bisque1', 'blue4', 'burlywood3', 'chartreuse3', 'coral3', 'cyan2', 'darkgray', 'darkorange', 'darkred'), .Dim = c(10L, 10L), class = 'raster'), 'white');`==`(argv[[1]],argv[[2]]);");
assertEval("argv <- list(structure(c('white', 'aquamarine3', 'bisque2', 'blueviolet', 'burlywood4', 'chartreuse4', 'coral4', 'cyan3', 'darkgreen', 'darkorange1', 'aliceblue', 'white', 'white', 'white', 'white', 'chocolate', 'cornflowerblue', 'cyan4', 'darkgrey', 'darkorange2', 'antiquewhite', 'white', 'white', 'white', 'white', 'chocolate1', 'cornsilk', 'darkblue', 'darkkhaki', 'darkorange3', 'antiquewhite1', 'white', 'white', 'white', 'white', 'chocolate2', 'cornsilk1', 'darkcyan', 'darkmagenta', 'darkorange4', 'antiquewhite2', 'azure2', 'blanchedalmond', 'brown3', 'cadetblue3', 'chocolate3', 'cornsilk2', 'darkgoldenrod', 'darkolivegreen', 'darkorchid', 'antiquewhite3', 'azure3', 'blue', 'brown4', 'cadetblue4', 'chocolate4', 'cornsilk3', 'darkgoldenrod1', 'darkolivegreen1', 'darkorchid1', 'antiquewhite4', 'azure4', 'blue1', 'burlywood', 'chartreuse', 'coral', 'cornsilk4', 'darkgoldenrod2', 'darkolivegreen2', 'darkorchid2', 'aquamarine', 'beige', 'blue2', 'burlywood1', 'chartreuse1', 'coral1', 'cyan', 'darkgoldenrod3', 'darkolivegreen3', 'darkorchid3', 'aquamarine1', 'bisque', 'blue3', 'burlywood2', 'chartreuse2', 'coral2', 'cyan1', 'darkgoldenrod4', 'darkolivegreen4', 'darkorchid4', 'aquamarine2', 'bisque1', 'blue4', 'burlywood3', 'chartreuse3', 'coral3', 'cyan2', 'darkgray', 'darkorange', 'darkred'), .Dim = c(10L, 10L), class = 'raster'), 'white');`==`(argv[[1]],argv[[2]]);");
}
@Test
......
......@@ -91,8 +91,8 @@ public class TestBuiltin_rbind extends TestBase {
// segfault in gnur
assertEval(Ignored.ReferenceError, "{ v <- 1; class(v) <- 'foo'; rbind.foo <- length; rbind(v) }");
assertEval(Ignored.WrongCaller, "{ v <- 1; class(v) <- 'foo'; rbind.foo <- rawToBits; rbind(v) }");
assertEval(Output.IgnoreErrorContext, "{ v <- 1; class(v) <- 'foo'; rbind.foo <- rawToBits; rbind(v) }");
assertEval("{ v <- 1; class(v) <- 'foo'; rbind(v) }");
assertEval("{ v <- 1; rbind.foo <- function(...) 'foo'; rbind(v) }");
......
......@@ -141,8 +141,7 @@ public class TestBuiltin_seq_along extends TestBase {
assertEval(Output.IgnoreWarningContext, "{ x <- c(1,2,3); class(x) <- 'myclass'; length.myclass <- function(w) 'hello world'; seq_along(x) }");
// length defined in global env should not get us confused:
assertEval("{ length <- function(x) 42; seq_along(c(1,2,3)) }");
// length in __S3MethodsTable__ should work too, N.B.: needs complete S3 dispatch support
assertEval(Ignored.Unimplemented,
"{ assign('length.myclass', function(...) 42, envir=.__S3MethodsTable__.); x <- 1; class(x) <- 'myclass'; res <- seq_along(x); rm('length.myclass', envir=.__S3MethodsTable__.); res }");
// length in __S3MethodsTable__ should work too
assertEval("{ assign('length.myclass', function(...) 42, envir=.__S3MethodsTable__.); x <- 1; class(x) <- 'myclass'; res <- seq_along(x); rm('length.myclass', envir=.__S3MethodsTable__.); res }");
}
}
......@@ -55,7 +55,7 @@ public class TestBuiltin_sprintf extends TestBase {
@Test
public void testsprintf8() {
assertEval(Ignored.Unknown, "argv <- list('plot_%02g', 1L); .Internal(sprintf(argv[[1]], argv[[2]]))");
assertEval("argv <- list('plot_%02g', 1L); .Internal(sprintf(argv[[1]], argv[[2]]))");
}
@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