[Rcpp-commits] r1208 - in pkg/RcppGSL/inst: include unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 12 14:17:27 CEST 2010


Author: edd
Date: 2010-05-12 14:17:27 +0200 (Wed, 12 May 2010)
New Revision: 1208

Modified:
   pkg/RcppGSL/inst/include/RcppGSLForward.h
   pkg/RcppGSL/inst/include/RcppGSL_caster.h
   pkg/RcppGSL/inst/include/RcppGSL_matrix.h
   pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h
   pkg/RcppGSL/inst/include/RcppGSL_vector.h
   pkg/RcppGSL/inst/include/RcppGSL_vector_view.h
   pkg/RcppGSL/inst/unitTests/runit.gsl.R
Log:
if we set this as a header and I hence tell Emacs that you use 4 spaces for a
tab, all indentation gets better


Modified: pkg/RcppGSL/inst/include/RcppGSLForward.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSLForward.h	2010-05-12 11:58:14 UTC (rev 1207)
+++ pkg/RcppGSL/inst/include/RcppGSLForward.h	2010-05-12 12:17:27 UTC (rev 1208)
@@ -1,3 +1,5 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
 // RcppGSLForward.h: Rcpp/GSL glue
 //
 // Copyright (C)  2010 Romain Francois and Dirk Eddelbuettel

Modified: pkg/RcppGSL/inst/include/RcppGSL_caster.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSL_caster.h	2010-05-12 11:58:14 UTC (rev 1207)
+++ pkg/RcppGSL/inst/include/RcppGSL_caster.h	2010-05-12 12:17:27 UTC (rev 1208)
@@ -1,3 +1,5 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
 // RcppGSL.h: Rcpp/GSL glue
 //
 // Copyright (C)  2010 Romain Francois and Dirk Eddelbuettel

Modified: pkg/RcppGSL/inst/include/RcppGSL_matrix.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSL_matrix.h	2010-05-12 11:58:14 UTC (rev 1207)
+++ pkg/RcppGSL/inst/include/RcppGSL_matrix.h	2010-05-12 12:17:27 UTC (rev 1208)
@@ -1,3 +1,5 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
 // RcppGSL_matrix.h: Rcpp/GSL glue
 //
 // Copyright (C)  2010 Romain Francois and Dirk Eddelbuettel

Modified: pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h	2010-05-12 11:58:14 UTC (rev 1207)
+++ pkg/RcppGSL/inst/include/RcppGSL_matrix_view.h	2010-05-12 12:17:27 UTC (rev 1208)
@@ -1,3 +1,5 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
 // RcppGSL_matrix_view.h: Rcpp/GSL glue
 //
 // Copyright (C)  2010 Romain Francois and Dirk Eddelbuettel

Modified: pkg/RcppGSL/inst/include/RcppGSL_vector.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSL_vector.h	2010-05-12 11:58:14 UTC (rev 1207)
+++ pkg/RcppGSL/inst/include/RcppGSL_vector.h	2010-05-12 12:17:27 UTC (rev 1208)
@@ -1,3 +1,5 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
 // RcppGSL.h: Rcpp/GSL glue
 //
 // Copyright (C)  2010 Romain Francois and Dirk Eddelbuettel

Modified: pkg/RcppGSL/inst/include/RcppGSL_vector_view.h
===================================================================
--- pkg/RcppGSL/inst/include/RcppGSL_vector_view.h	2010-05-12 11:58:14 UTC (rev 1207)
+++ pkg/RcppGSL/inst/include/RcppGSL_vector_view.h	2010-05-12 12:17:27 UTC (rev 1208)
@@ -1,3 +1,5 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
 // RcppGSL.h: Rcpp/GSL glue
 //
 // Copyright (C)  2010 Romain Francois and Dirk Eddelbuettel

Modified: pkg/RcppGSL/inst/unitTests/runit.gsl.R
===================================================================
--- pkg/RcppGSL/inst/unitTests/runit.gsl.R	2010-05-12 11:58:14 UTC (rev 1207)
+++ pkg/RcppGSL/inst/unitTests/runit.gsl.R	2010-05-12 12:17:27 UTC (rev 1208)
@@ -1,4 +1,5 @@
 #!/usr/bin/r -t
+#                        Emacs make this -*- mode: R; tab-width: 4 -*-
 #
 # Copyright (C) 2010	Romain Francois and Dirk Eddelbuettel
 #
@@ -41,23 +42,23 @@
 
 test.gsl.vector <- function(){
 	res <- .Call( "test_gsl_vector", PACKAGE = "RcppGSL" )
-	checkEquals( res, 
-		list( 
-			"gsl_vector" = numeric(10), 
-			"gsl_vector_float" = numeric(10), 
-			"gsl_vector_int" = integer(10), 
-			"gsl_vector_long" = numeric(10), 
-			"gsl_vector_char" = raw(10), 
-			"gsl_vector_complex" = complex(10), 
-			"gsl_vector_complex_float" = complex(10), 
-			"gsl_vector_complex_long_double" = complex(10), 
-			"gsl_vector_long_double" = numeric(10), 
-			"gsl_vector_short" = integer(10), 
-			"gsl_vector_uchar" = raw(10), 
-			"gsl_vector_uint" = integer(10), 
-			"gsl_vector_ushort" = integer(10), 
+	checkEquals( res,
+		list(
+			"gsl_vector" = numeric(10),
+			"gsl_vector_float" = numeric(10),
+			"gsl_vector_int" = integer(10),
+			"gsl_vector_long" = numeric(10),
+			"gsl_vector_char" = raw(10),
+			"gsl_vector_complex" = complex(10),
+			"gsl_vector_complex_float" = complex(10),
+			"gsl_vector_complex_long_double" = complex(10),
+			"gsl_vector_long_double" = numeric(10),
+			"gsl_vector_short" = integer(10),
+			"gsl_vector_uchar" = raw(10),
+			"gsl_vector_uint" = integer(10),
+			"gsl_vector_ushort" = integer(10),
 			"gsl_vector_ulong" = numeric(10)
-		), 
+		),
 		msg = "wrap( gsl_vector )" )
 }
 
@@ -65,37 +66,37 @@
 	helper <- function(what){
 		as.what <- get( paste( "as.", deparse(substitute(what)), sep = "" ) )
 		x <- what(10)
-		x[1] <- as.what(1) 
+		x[1] <- as.what(1)
 		x[7] <- as.what(1)
 		dim( x )  <- c(5,2)
 		x
 	}
 	res <- .Call( "test_gsl_matrix", PACKAGE = "RcppGSL" )
-	checkEquals( res, 
-		list( 
-			"gsl_matrix"                     = helper( numeric ), 
-			"gsl_matrix_float"               = helper( numeric ), 
-			"gsl_matrix_int"                 = helper( integer ), 
-			"gsl_matrix_long"                = helper( numeric ), 
-			"gsl_matrix_char"                = helper( raw ), 
-			"gsl_matrix_complex"             = helper( complex ), 
-			"gsl_matrix_complex_float"       = helper( complex ), 
-			"gsl_matrix_complex_long_double" = helper( complex ), 
-			"gsl_matrix_long_double"         = helper( numeric ), 
-			"gsl_matrix_short"               = helper( integer ), 
-			"gsl_matrix_uchar"               = helper( raw ), 
-			"gsl_matrix_uint"                = helper( integer ), 
-			"gsl_matrix_ushort"              = helper( integer ), 
+	checkEquals( res,
+		list(
+			"gsl_matrix"                     = helper( numeric ),
+			"gsl_matrix_float"               = helper( numeric ),
+			"gsl_matrix_int"                 = helper( integer ),
+			"gsl_matrix_long"                = helper( numeric ),
+			"gsl_matrix_char"                = helper( raw ),
+			"gsl_matrix_complex"             = helper( complex ),
+			"gsl_matrix_complex_float"       = helper( complex ),
+			"gsl_matrix_complex_long_double" = helper( complex ),
+			"gsl_matrix_long_double"         = helper( numeric ),
+			"gsl_matrix_short"               = helper( integer ),
+			"gsl_matrix_uchar"               = helper( raw ),
+			"gsl_matrix_uint"                = helper( integer ),
+			"gsl_matrix_ushort"              = helper( integer ),
 			"gsl_matrix_ulong"               = helper( numeric )
-		), 
+		),
 		msg = "wrap( gsl_matrix )" )
 
 }
 
 test.gsl.vector.view <- function(){
 	res <- .Call( "test_gsl_vector_view", PACKAGE = "RcppGSL" )
-	checkEquals( res, 
-		list( even = 2.0 * 0:4, odd = 2.0 * 0:4 + 1.0 ), 
+	checkEquals( res,
+		list( even = 2.0 * 0:4, odd = 2.0 * 0:4 + 1.0 ),
 		msg = "wrap( gsl.vector.view )" )
 }
 



More information about the Rcpp-commits mailing list