| Line 251... |
Line 251... |
| 251 |
mnames2 <- objects(getClass("refClassB")@refMethods)
|
251 |
mnames2 <- objects(getClass("refClassB")@refMethods)
|
| 252 |
stopifnot(identical(mnames2[is.na(match(mnames2,mnames))], "foo#refClassA"))
|
252 |
stopifnot(identical(mnames2[is.na(match(mnames2,mnames))], "foo#refClassA"))
|
| 253 |
refClassB$methods(foo=function() paste(callSuper(), "Version 2"))
|
253 |
refClassB$methods(foo=function() paste(callSuper(), "Version 2"))
|
| 254 |
stopifnot(identical(refClassB$new()$foo(), "A Version 2"))
|
254 |
stopifnot(identical(refClassB$new()$foo(), "A Version 2"))
|
| 255 |
stopifnot(identical(mnames2, objects(getClass("refClassB")@refMethods)))
|
255 |
stopifnot(identical(mnames2, objects(getClass("refClassB")@refMethods)))
|
| - |
|
256 |
|
| - |
|
257 |
if(methods:::.hasCodeTools()) {
|
| - |
|
258 |
## code warnings assigning locally to, or hiding, field names
|
| - |
|
259 |
stopifnot(is(tryCatch(mv$methods(test = function(x) {data <- x[!is.na(x)]; mean(data)}), warning = function(e)e), "warning"))
|
| - |
|
260 |
|
| - |
|
261 |
stopifnot(is(tryCatch(mv$methods(test2 = function(data) {data[!is.na(x)]}), warning = function(e)e), "warning"))
|
| - |
|
262 |
} else
|
| - |
|
263 |
warning("Can't run some tests: recommended package codetools is not available")
|