@@ -70,3 +70,46 @@ expect_equal( DataFrame_nrow( df ), rep(nrow(df), 2) )
7070# test.DataFrame.ncol <- function(){
7171df <- data.frame ( x = 1 : 10 , y = 1 : 10 )
7272expect_equal( DataFrame_ncol( df ), rep(ncol(df ), 2 ) )
73+
74+ # test.DataFrame.PushBackNamed <- function(){
75+ df <- data.frame ( u = c(0 , 0 ), v = c(0 , 0 ) )
76+ expect_true( is.data.frame( DataFrame_PushBackNamed() ) )
77+ expect_equal( DataFrame_PushBackNamed(), df )
78+
79+ # test.DataFrame.PushBackUnamed <- function(){
80+ df <- data.frame ( u = c(0 , 0 ), c(0 , 0 ) )
81+ expect_true( is.data.frame( DataFrame_PushBackUnnamed() ) )
82+ expect_equal( DataFrame_PushBackUnnamed(), df )
83+
84+ # test.DataFrame.PushFrontNamed <- function(){
85+ df <- data.frame ( v = c(0 , 0 ), u = c(0 , 0 ) )
86+ expect_true( is.data.frame( DataFrame_PushFrontNamed() ) )
87+ expect_equal( DataFrame_PushFrontNamed(), df )
88+
89+ # test.DataFrame.PushFrontUnnamed <- function(){
90+ df <- data.frame ( c(0 , 0 ), u = c(0 , 0 ) )
91+ expect_true( is.data.frame( DataFrame_PushFrontUnnamed() ) )
92+ expect_equal( DataFrame_PushFrontUnnamed(), df )
93+
94+
95+ # test.DataFrame.PushFrontDataFrame <- function(){
96+ df <- data.frame ( w = c(0 , 0 ), x = c(0 , 0 ), u = c(0 , 0 ), v = c(0 , 0 ) )
97+ expect_true( is.data.frame( DataFrame_PushFrontDataFrame() ) )
98+ expect_equal( DataFrame_PushFrontDataFrame(), df )
99+
100+ # test.DataFrame.PushBackDataFrame <- function(){
101+ df <- data.frame ( u = c(0 , 0 ), v = c(0 , 0 ), w = c(0 , 0 ), x = c(0 , 0 ) )
102+ expect_true( is.data.frame( DataFrame_PushBackDataFrame() ) )
103+ expect_equal( DataFrame_PushBackDataFrame(), df )
104+
105+ # test.DataFrame.PushWrongSize <- function(){
106+ df <- data.frame ( u = c(0 , 0 ), v = c(0 , 0 ), w = c(0 , 0 ), x = c(0 , 0 ) )
107+ expect_warning( DataFrame_PushWrongSize() )
108+
109+ # test.DataFrame.PushReplicateLength <- function(){
110+ df <- data.frame ( u = c(1 , 0 ), v = c(0 , 0 , 0 , 0 ), x = c(2 ) )
111+ expect_true( is.data.frame( DataFrame_PushReplicateLength() ) )
112+ expect_equal( DataFrame_PushReplicateLength(), df )
113+
114+ # test.DataFrame.PushZeroLength <- function(){
115+ expect_warning( DataFrame_PushZeroLength())
0 commit comments