inst/tests/test-gcheckbox.R

test.gcheckbox <- function() {
  w <- gwindow()
  g <- ggroup(cont = w, horiz = FALSE)

  text <- "text"; newText <- "newtext"

  
  l <- gcheckbox(text, checked=TRUE, cont = g)
  
  ## svalue
  checkEquals(svalue(l), TRUE)

  ## svalue<-
  svalue(l) <- FALSE
  checkEquals(svalue(l), FALSE)

  ## [
  checkEquals(l[], text)

  ## [<-
  l[] <- newText
  checkEquals(l[], newText)
}

Try the gWidgets package in your browser

Any scripts or data that you put into this service are public.

gWidgets documentation built on April 29, 2020, 9:37 a.m.