[Rcpp-commits] r3374 - pkg/int64/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 17 08:24:50 CET 2011


Author: romain
Date: 2011-11-17 08:24:46 +0100 (Thu, 17 Nov 2011)
New Revision: 3374

Modified:
   pkg/int64/inst/unitTests/runit.int64.R
Log:
testing NA behavior when reading strings

Modified: pkg/int64/inst/unitTests/runit.int64.R
===================================================================
--- pkg/int64/inst/unitTests/runit.int64.R	2011-11-17 07:19:30 UTC (rev 3373)
+++ pkg/int64/inst/unitTests/runit.int64.R	2011-11-17 07:24:46 UTC (rev 3374)
@@ -117,3 +117,15 @@
     
 }
 
+
+test.na <- function(){
+    old.op <- options( warn = 2 )
+    checkException( as.int64( "abcd12434" ) )
+    checkException( as.uint64( "abcd12434" ) )
+    
+    checkEquals( as.int64("1234"), as.int64(1234))
+    checkEquals( as.uint64("1234"), as.uint64(1234))
+    
+    options( old.op )
+}
+



More information about the Rcpp-commits mailing list