[Rcpp-commits] r1057 - deprecated pkg/Rcpp/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Apr 17 14:24:59 CEST 2010


Author: romain
Date: 2010-04-17 14:24:58 +0200 (Sat, 17 Apr 2010)
New Revision: 1057

Added:
   deprecated/runit.dotCpp.R
Removed:
   pkg/Rcpp/inst/unitTests/runit.dotCpp.R
Log:
depreciate .Cpp

Copied: deprecated/runit.dotCpp.R (from rev 1053, pkg/Rcpp/inst/unitTests/runit.dotCpp.R)
===================================================================
--- deprecated/runit.dotCpp.R	                        (rev 0)
+++ deprecated/runit.dotCpp.R	2010-04-17 12:24:58 UTC (rev 1057)
@@ -0,0 +1,46 @@
+#!/usr/bin/r -t
+#
+# Copyright (C) 2010	Dirk Eddelbuettel and Romain Francois
+#
+# This file is part of Rcpp.
+#
+# Rcpp is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# Rcpp is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+generate.dot.cpp.code <- function(i, suffix = "" ){
+	code <- sprintf( '.Cpp( "testfun_%s%d" %s, PACKAGE = "Rcpp" )', suffix, i, 
+		if( i == 0L ) "" else paste( ", ", paste( 0:(i-1), collapse = ", "), sep = "" )
+	)
+	parse( text = code )
+}
+
+test.dot.cpp <- function(){
+	for( i in 0:65 ){
+		expr <- generate.dot.cpp.code(i)
+		checkEquals( eval(expr), i, msg = sprintf( ".Cpp (%d arguments)", i ) )
+	}
+}
+
+test.dot.cpp.exceptions <- function(){
+	for( i in 0:65 ){
+		expr <- generate.dot.cpp.code(i, "ex_")
+		error <- tryCatch( {
+			eval(expr)
+			FALSE	
+		}, "std::range_error" = function(e){
+			TRUE
+		} )
+		checkTrue( error, msg = sprintf( ".Cpp (%d arguments) throwing exception", i ) )
+	}
+}
+

Deleted: pkg/Rcpp/inst/unitTests/runit.dotCpp.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.dotCpp.R	2010-04-17 12:24:10 UTC (rev 1056)
+++ pkg/Rcpp/inst/unitTests/runit.dotCpp.R	2010-04-17 12:24:58 UTC (rev 1057)
@@ -1,46 +0,0 @@
-#!/usr/bin/r -t
-#
-# Copyright (C) 2010	Dirk Eddelbuettel and Romain Francois
-#
-# This file is part of Rcpp.
-#
-# Rcpp is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# Rcpp is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
-
-generate.dot.cpp.code <- function(i, suffix = "" ){
-	code <- sprintf( '.Cpp( "testfun_%s%d" %s, PACKAGE = "Rcpp" )', suffix, i, 
-		if( i == 0L ) "" else paste( ", ", paste( 0:(i-1), collapse = ", "), sep = "" )
-	)
-	parse( text = code )
-}
-
-test.dot.cpp <- function(){
-	for( i in 0:65 ){
-		expr <- generate.dot.cpp.code(i)
-		checkEquals( eval(expr), i, msg = sprintf( ".Cpp (%d arguments)", i ) )
-	}
-}
-
-test.dot.cpp.exceptions <- function(){
-	for( i in 0:65 ){
-		expr <- generate.dot.cpp.code(i, "ex_")
-		error <- tryCatch( {
-			eval(expr)
-			FALSE	
-		}, "std::range_error" = function(e){
-			TRUE
-		} )
-		checkTrue( error, msg = sprintf( ".Cpp (%d arguments) throwing exception", i ) )
-	}
-}
-



More information about the Rcpp-commits mailing list