The R Project SVN R

Rev

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

Rev 53274 Rev 53330
Line 259... Line 259...
259
    stopifnot(is(tryCatch(mv$methods(test = function(x) {data <- x[!is.na(x)]; mean(data)}), warning = function(e)e), "warning"))
259
    stopifnot(is(tryCatch(mv$methods(test = function(x) {data <- x[!is.na(x)]; mean(data)}), warning = function(e)e), "warning"))
260
 
260
 
261
    stopifnot(is(tryCatch(mv$methods(test2 = function(data) {data[!is.na(x)]}), warning = function(e)e), "warning"))
261
    stopifnot(is(tryCatch(mv$methods(test2 = function(data) {data[!is.na(x)]}), warning = function(e)e), "warning"))
262
} else
262
} else
263
    warning("Can't run some tests:  recommended package codetools is not available")
263
    warning("Can't run some tests:  recommended package codetools is not available")
-
 
264
 
-
 
265
## tests (fragmentary by necessity) of promptClass for reference class
-
 
266
suppressMessages(promptClass("refClassB", filename = textConnection("ctxt", "w")))
-
 
267
## look for a method, inheritance, inherited method
-
 
268
stopifnot(length(c(grep("foo.*refClassA", ctxt),
-
 
269
                   grep("code{foo()}", ctxt, fixed = TRUE),
-
 
270
                   grep("linkS4class{refClassA", ctxt, fixed = TRUE))) >= 3)
-
 
271
rm(ctxt)