Skip to content

Commit

Permalink
regression test related to earlier fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@52920 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
maechler committed Sep 16, 2010
1 parent 2c18542 commit 249faff
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
11 changes: 11 additions & 0 deletions tests/reg-S4.R
Original file line number Diff line number Diff line change
Expand Up @@ -576,3 +576,14 @@ stopifnot(is(qqplot, "standardGeneric"),
identical(qqplot@signature, c("x","y")))
## failed for a day ~ 2005-05-26, for R-devel only


## 'L$A@x <- ..'
setClass("foo", representation(x = "numeric"))
f <- new("foo", x = pi*1:2)
L <- list()
L$A <- f
L$A@x[] <- 7
if( identical(f, L$A) )
stop("Oops! f is identical to L$A, even though not touched!")
## did not duplicate in 2.0.0 <= Rversion <= 2.11.1

14 changes: 13 additions & 1 deletion tests/reg-S4.Rout.save
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

R version 2.12.0 Under development (unstable) (2010-05-26 r52106)
R version 2.12.0 Under development (unstable) (2010-09-16 r52918)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
Expand Down Expand Up @@ -884,3 +884,15 @@ Creating a generic for 'qqplot' in package '.GlobalEnv'
> ## failed for a day ~ 2005-05-26, for R-devel only
>
>
> ## 'L$A@x <- ..'
> setClass("foo", representation(x = "numeric"))
[1] "foo"
> f <- new("foo", x = pi*1:2)
> L <- list()
> L$A <- f
> L$A@x[] <- 7
> if( identical(f, L$A) )
+ stop("Oops! f is identical to L$A, even though not touched!")
> ## did not duplicate in 2.0.0 <= Rversion <= 2.11.1
>
>
7 changes: 7 additions & 0 deletions tests/reg-tests-1.R
Original file line number Diff line number Diff line change
Expand Up @@ -4895,6 +4895,7 @@ try( ksmooth(cars$speed, cars$dists) )
try( do.call(function(x) NextMethod('foo'),list()) )
## segfaulted <= 2.11.1


## identical() returned FALSE on external ptr with
## identical addresses <= 2.11.1
stopifnot(identical(
Expand All @@ -4903,3 +4904,9 @@ stopifnot(identical(
stopifnot(!identical(
getNativeSymbolInfo("R_getSymbolInfo", "base"),
getNativeSymbolInfo("R_getRegisteredRoutines", "base")))


## getNamespaceVersion() etc
stopifnot(getNamespaceVersion("stats") == getRversion())
## failed in R 2.11.x

0 comments on commit 249faff

Please sign in to comment.