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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Dec 4 02:45:57 CET 2014


Author: murray
Date: 2014-12-04 02:45:57 +0100 (Thu, 04 Dec 2014)
New Revision: 929

Modified:
   pkg/ChangeLog
   pkg/inst/unitTests/runit.int64.R
Log:
Save the options and restore them on.exit to make this test indempotent.  This might be responsible for some
unit test failures if R CMD CHECK now runs the same testSuite twice, which I don't think it does.



Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2014-12-03 22:09:22 UTC (rev 928)
+++ pkg/ChangeLog	2014-12-04 01:45:57 UTC (rev 929)
@@ -1,3 +1,8 @@
+2014-12-04  Murray Stokely  <mstokely at google.com>
+
+	* inst/unitTests/runit.int64.R: restore options on exit from this
+	  function to make the test indempotent.
+
 2014-12-01  Dirk Eddelbuettel  <edd at debian.org>
 
 	* man/Message-class.Rd: Completed documentation

Modified: pkg/inst/unitTests/runit.int64.R
===================================================================
--- pkg/inst/unitTests/runit.int64.R	2014-12-03 22:09:22 UTC (rev 928)
+++ pkg/inst/unitTests/runit.int64.R	2014-12-04 01:45:57 UTC (rev 929)
@@ -15,6 +15,10 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 test.int64 <- function() {
+    # Preserve option.
+    old.optval <- options("RProtoBuf.int64AsString")
+    on.exit(options(old.optval))
+
     if (!exists("protobuf_unittest.TestAllTypes",
                 "RProtoBuf:DescriptorPool")) {
         unittest.proto.file <- system.file("unitTests", "data",



More information about the Rprotobuf-commits mailing list