[Rprotobuf-commits] r887 - in pkg: . inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 25 04:37:52 CET 2014


Author: murray
Date: 2014-03-25 04:37:51 +0100 (Tue, 25 Mar 2014)
New Revision: 887

Modified:
   pkg/ChangeLog
   pkg/inst/unitTests/runit.int64.R
Log:
Add check on Rcpp:::capabilities for LONG LONG support before trying
to run the 64-bit int tests.



Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2014-03-25 03:01:01 UTC (rev 886)
+++ pkg/ChangeLog	2014-03-25 03:37:51 UTC (rev 887)
@@ -1,5 +1,8 @@
 2014-03-24  Murray Stokely  <mstokely at google.com>
 
+	* inst/unitTests/runit.int64.R (test.int64): Check
+	  Rcpp:::capabilities() to ensure we have long long support in Rcpp
+	  before trying to run the 64-bit integer tests.
 	* inst/unitTests/data/unittest.proto: Comment out
 	  TestEnumWithDupValue.  This causes problems with the newest
 	  libprotobuf-2.5 which now wants an option to be specified to

Modified: pkg/inst/unitTests/runit.int64.R
===================================================================
--- pkg/inst/unitTests/runit.int64.R	2014-03-25 03:01:01 UTC (rev 886)
+++ pkg/inst/unitTests/runit.int64.R	2014-03-25 03:37:51 UTC (rev 887)
@@ -27,6 +27,10 @@
       warning("Can't test 64-bit int type on platform with sizeof(long long) < 8")
       return
     }
+    if (Rcpp:::capabilities()["long long"] != TRUE) {
+      warning("Can't test 64-bit int type without RCPP_LONG_LONG support.")
+      return
+    }
 
     a <- new(protobuf_unittest.TestAllTypes)
     a$repeated_int64 <- 1



More information about the Rprotobuf-commits mailing list