The R Project SVN R

Rev

Rev 53335 | Rev 53385 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 53335 Rev 53382
Line 268... Line 268...
268
## look for a method, inheritance, inherited method
268
## look for a method, inheritance, inherited method
269
stopifnot(length(c(grep("foo.*refClassA", ctxt),
269
stopifnot(length(c(grep("foo.*refClassA", ctxt),
270
                   grep("code{foo()}", ctxt, fixed = TRUE),
270
                   grep("code{foo()}", ctxt, fixed = TRUE),
271
                   grep("linkS4class{refClassA", ctxt, fixed = TRUE))) >= 3)
271
                   grep("linkS4class{refClassA", ctxt, fixed = TRUE))) >= 3)
272
rm(ctxt)
272
rm(ctxt)
-
 
273
 
-
 
274
 
-
 
275
## tests related to subclassing environments.  These really test code in the core, viz. builtin.c
-
 
276
a <- refClassA$new()
-
 
277
ev <- new.env(parent = a) # parent= arg
-
 
278
stopifnot(is.environment(ev))
-
 
279
foo <- function()"A"; environment(foo) <- a # environment of function
-
 
280
stopifnot(identical(as.environment(a), environment(foo)))
-
 
281
xx <- 1:10; environment(xx) <- a # environment attribute
-
 
282
stopifnot(identical(as.environment(a), environment(xx)))
-
 
283
 
-
 
284