[Rcpp-commits] r1162 - pkg/Rcpp/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 4 13:56:12 CEST 2010


Author: edd
Date: 2010-05-04 13:56:11 +0200 (Tue, 04 May 2010)
New Revision: 1162

Modified:
   pkg/Rcpp/inst/unitTests/runit.Argument.R
   pkg/Rcpp/inst/unitTests/runit.DataFrame.R
Log:
test functions start with test., not runit.


Modified: pkg/Rcpp/inst/unitTests/runit.Argument.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.Argument.R	2010-05-04 11:39:30 UTC (rev 1161)
+++ pkg/Rcpp/inst/unitTests/runit.Argument.R	2010-05-04 11:56:11 UTC (rev 1162)
@@ -17,13 +17,12 @@
 # You should have received a copy of the GNU General Public License
 # along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
 
-runit.Argument <- function(){
+test.Argument <- function(){
+    fx <- cppfunction( signature(), '
+	Argument x("x") ;
+	Argument y("y") ;
 
-	fx <- cppfunction( signature(), '
-		Argument x("x") ;
-		Argument y("y") ;
-	
-		return make_list( x = 2, y = 3 ); 
-	' )
-	checkEquals( fx(), list( x = 2L, y = 3L ) , msg = "Argument")	
+	return make_list( x = 2, y = 3 );
+    ' )
+    checkEquals( fx(), list( x = 2L, y = 3L ) , msg = "Argument")
 }

Modified: pkg/Rcpp/inst/unitTests/runit.DataFrame.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.DataFrame.R	2010-05-04 11:39:30 UTC (rev 1161)
+++ pkg/Rcpp/inst/unitTests/runit.DataFrame.R	2010-05-04 11:56:11 UTC (rev 1162)
@@ -17,27 +17,27 @@
 # You should have received a copy of the GNU General Public License
 # along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
 
-runit.DataFrame.FromSEXP <- function() {
+test.DataFrame.FromSEXP <- function() {
     DF <- data.frame(a=1:3, b=c("a","b","c"))
-	fun <- cppfunction( signature(x='ANY'), '
-		DataFrame df(x) ;
-		return df;
-	' )
-	checkEquals( fun(DF), DF, msg = "DataFrame pass-through")
+    fun <- cppfunction( signature(x='ANY'), '
+	DataFrame df(x) ;
+	return df;
+    ' )
+    checkEquals( fun(DF), DF, msg = "DataFrame pass-through")
 }
 
-runit.DataFrame.create1 <- function() {
+test.DataFrame.CreateOne <- function() {
     DF <- data.frame(a=1:3)
-	fun <- cppfunction( signature(), '
+    fun <- cppfunction( signature(), '
         IntegerVector v = IntegerVector::create(1,2,3);
 		return DataFrame::create(Named("a")=v);
-	' )
-	checkEquals( fun(), DF, msg = "DataFrame create1")
+    ' )
+    checkEquals( fun(), DF, msg = "DataFrame create1")
 }
 
-runit.DataFrame.create2 <- function() {
+test.DataFrame.CreateTwo <- function() {
     DF <- data.frame(a=1:3, b=c("a","b","c"))
-	fun <- cppfunction( signature(), '
+    fun <- cppfunction( signature(), '
         IntegerVector v = IntegerVector::create(1,2,3);
         std::vector<std::string> s(3);
         s[0] = "a";
@@ -45,5 +45,5 @@
         s[2] = "c";
 		return DataFrame::create(Named("a")=v, Named("b")=s);
 	' )
-	checkEquals( fun(), DF, msg = "DataFrame create2")
+    checkEquals( fun(), DF, msg = "DataFrame create2")
 }



More information about the Rcpp-commits mailing list