[Rprotobuf-commits] r542 - pkg/inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Nov 15 04:30:48 CET 2013
Author: murray
Date: 2013-11-15 04:30:47 +0100 (Fri, 15 Nov 2013)
New Revision: 542
Modified:
pkg/inst/unitTests/runit.extensions.R
Log:
Add another unit test that I used when looking into the nested
extension messages issue that is still unresolved.
Modified: pkg/inst/unitTests/runit.extensions.R
===================================================================
--- pkg/inst/unitTests/runit.extensions.R 2013-11-14 02:47:25 UTC (rev 541)
+++ pkg/inst/unitTests/runit.extensions.R 2013-11-15 03:30:47 UTC (rev 542)
@@ -56,10 +56,17 @@
"foo")
## Test setting and getting enums.
- # This works now
test$setExtension(protobuf_unittest.optional_nested_enum_extension,
protobuf_unittest.TestAllTypes.NestedEnum$BAR)
+ ## Test foreign message extensions
+ foo <- new(protobuf_unittest.ForeignMessage)
+ foo$c <- 3
+ test$setExtension(protobuf_unittest.optional_foreign_message_extension,
+ foo)
+ checkEquals(test$getExtension(protobuf_unittest.optional_foreign_message_extension)$c,
+ 3)
+
# This causes an Rcpp exception, but not an R stop error as of my
# version of Rcpp, so we can't checkError unfortunately, but we
# can at least make sure it doesn't crash R.
More information about the Rprotobuf-commits
mailing list