Skip to content
Snippets Groups Projects
Commit 4dcb1b95 authored by Florian Angerer's avatar Florian Angerer
Browse files

Added unit test for S4 dispatch in functions rbind/cbind.

parent 6990aa76
No related branches found
No related tags found
No related merge requests found
......@@ -136,6 +136,9 @@ public class TestBuiltin_cbind extends TestBase {
assertEval("{ v1 <- 1; class(v1) <- 'foo1'; cbind.foo1 <- function(...) 'foo1'; v2 <- 2; class(v2) <- 'foo2'; cbind.foo2 <- function(...) 'foo2'; cbind(v1, v2) }");
assertEval("{ v1 <- 1; class(v1) <- 'foo1'; cbind.foo1 <- function(...) 'foo1'; v2 <- 2; class(v2) <- 'foo2'; cbind(v1, v2) }");
assertEval("{ v1 <- 1; class(v1) <- 'foo1'; v2 <- 2; class(v2) <- 'foo2'; cbind.foo2 <- function(...) 'foo2'; cbind(v1, v2) }");
// S4
assertEval("{ setClass('fooo', slots = c(a='numeric')); obj <- new('fooo'); cbind(obj) }");
}
@Test
......
......@@ -111,6 +111,9 @@ public class TestBuiltin_rbind extends TestBase {
assertEval("{ v1 <- 1; class(v1) <- 'foo1'; rbind.foo1 <- function(...) 'foo1'; v2 <- 2; class(v2) <- 'foo2'; rbind.foo2 <- function(...) 'foo2'; rbind(v1, v2) }");
assertEval("{ v1 <- 1; class(v1) <- 'foo1'; rbind.foo1 <- function(...) 'foo1'; v2 <- 2; class(v2) <- 'foo2'; rbind(v1, v2) }");
assertEval("{ v1 <- 1; class(v1) <- 'foo1'; v2 <- 2; class(v2) <- 'foo2'; rbind.foo2 <- function(...) 'foo2'; rbind(v1, v2) }");
// S4
assertEval("{ setClass('fooo', slots = c(a='numeric')); obj <- new('fooo'); rbind(obj) }");
}
@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