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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 11 03:56:03 CET 2011


Author: edd
Date: 2011-01-11 03:56:03 +0100 (Tue, 11 Jan 2011)
New Revision: 408

Added:
   pkg/inst/unitTests/runit.import.R
Modified:
   pkg/ChangeLog
   pkg/inst/NEWS
Log:
new 'addendum' to patch by Murray with 
 - another simple unit test for behaviour when reading non-existing files -- exception
ChangeLog and NEWS updated


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2011-01-11 02:35:26 UTC (rev 407)
+++ pkg/ChangeLog	2011-01-11 02:56:03 UTC (rev 408)
@@ -5,7 +5,8 @@
 	   - man/readProtoFiles.Rd: documenting new 'pattern' argument
 	   - src/DescriptorPoolLookup.cpp: enhanced error message
 	   - inst/unitTests/runit.golden.message.R: new unit test for
-	   repeated fields fixed (which was issue addressed earlier)
+	     repeated fields fixed (which was issue addressed earlier)
+	   - inst/runit.import.R: new unit test for non-existing file
 
 2011-01-07  Dirk Eddelbuettel  <edd at debian.org>
 

Modified: pkg/inst/NEWS
===================================================================
--- pkg/inst/NEWS	2011-01-11 02:35:26 UTC (rev 407)
+++ pkg/inst/NEWS	2011-01-11 02:56:03 UTC (rev 408)
@@ -4,9 +4,10 @@
          - correct a typo preventing some functions from being called, 
          - add bounds checking in call to google protobuf library, 
          - add a new name method 
-         - add a tiny unit test 
+         - add a tiny unit test for the above
 	 - add more graceful error handling
 	 - add support for import patterns other than .proto$, 
+	 - add simple reading file that does not exist (exception) test
 	 - add simple repeated field unit test
 
 0.2.1   2010-10-18

Added: pkg/inst/unitTests/runit.import.R
===================================================================
--- pkg/inst/unitTests/runit.import.R	                        (rev 0)
+++ pkg/inst/unitTests/runit.import.R	2011-01-11 02:56:03 UTC (rev 408)
@@ -0,0 +1,20 @@
+# Copyright 2011 Google Inc.
+# 
+# This program 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.
+# 
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+test.import <- function() {
+  # Verify we get a graceful errorr ather than segfault.
+  checkException(readProtoFiles("/etc/hosts"))
+}



More information about the Rprotobuf-commits mailing list