The R Project SVN R

Rev

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

Rev 61035 Rev 61058
Line 476... Line 476...
476
 
476
 
477
## but don't allow assigment
477
## but don't allow assigment
478
if(methods:::.hasCodeTools())
478
if(methods:::.hasCodeTools())
479
        stopifnot(is(tryCatch(yy$.self$data <- xMat, error = function(e)e), "error"))
479
        stopifnot(is(tryCatch(yy$.self$data <- xMat, error = function(e)e), "error"))
480
 
480
 
481
## the locked binding of refObjectGenerator class should prevent modifying
481
## the locked binding of refGeneratorSlot class should prevent modifying
482
## methods, locking fields or setting accessor methods
482
## methods, locking fields or setting accessor methods
-
 
483
## Nothing special about refGeneratorSlot in this test -- the point is just
-
 
484
## to use a standard reference class known to be defined in a package
483
evr <- getRefClass("refObjectGenerator") # in methods
485
evr <- getRefClass("refGeneratorSlot") # in methods
484
stopifnot(is(tryCatch(evr$methods(foo = function()"..."), error = function(e)e), "error"),
486
stopifnot(is(tryCatch(evr$methods(foo = function()"..."), error = function(e)e), "error"),
485
         is(tryCatch(evr$lock("def"), error = function(e)e), "error"),
487
         is(tryCatch(evr$lock("def"), error = function(e)e), "error"),
486
         is(tryCatch(evr$accessors("def"), error = function(e)e), "error"))
488
         is(tryCatch(evr$accessors("def"), error = function(e)e), "error"))
487
 
489
 
488
##getRefClass() method and function should work with either
490
##getRefClass() method and function should work with either