[Rprotobuf-commits] r433 - pkg/inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Nov 7 15:13:49 CET 2011
Author: romain
Date: 2011-11-07 15:13:49 +0100 (Mon, 07 Nov 2011)
New Revision: 433
Modified:
pkg/inst/unitTests/runit.int64.support.R
Log:
testing int64 support in message fields
Modified: pkg/inst/unitTests/runit.int64.support.R
===================================================================
--- pkg/inst/unitTests/runit.int64.support.R 2011-11-07 14:08:38 UTC (rev 432)
+++ pkg/inst/unitTests/runit.int64.support.R 2011-11-07 14:13:49 UTC (rev 433)
@@ -23,9 +23,22 @@
}
test.int64 <- function() {
- msg <- new( TestInt64, a = 1, b = 2, c = 1:4, d = 1:4 )
+ msg <- new( TestInt64, a = 1, b = 2, c = seq(1,4,by=1), d = seq(1,4,by=1) )
checkEquals( msg$a, as.int64(1) )
checkEquals( msg$b, as.uint64(2) )
checkEquals( msg$c, as.int64(1:4) )
checkEquals( msg$d, as.uint64(1:4) )
+
+ msg <- new( TestInt64, a = 1L, b = 2L, c = 1:4, d = 1:4 )
+ checkEquals( msg$a, as.int64(1) )
+ checkEquals( msg$b, as.uint64(2) )
+ checkEquals( msg$c, as.int64(1:4) )
+ checkEquals( msg$d, as.uint64(1:4) )
+
+ msg <- new( TestInt64, a = as.int64(1), b = as.int64(2), c = as.int64(1:4), d = as.int64(1:4) )
+ checkEquals( msg$a, as.int64(1) )
+ checkEquals( msg$b, as.uint64(2) )
+ checkEquals( msg$c, as.int64(1:4) )
+ checkEquals( msg$d, as.uint64(1:4) )
+
}
More information about the Rprotobuf-commits
mailing list