Running 'accessors.R' [0s]
  Running 'arithmetic.R' [0s]
  Running 'comparators.R' [0s]
  Running 'constructor.R' [152s]
  Running 'converters.r' [156s]
  Running 'howbig.R' [168s]
  Running 'howmany.r' [151s]
  Running 'hr.R' [156s]
  Running 'swap.R' [0s]
  Running 'sysinfo.R' [0s]
Running the tests in 'tests/constructor.R' failed.
Complete output:
  > library(methods)
  > library(memuse)
  > 
  > same = function(x, y) stopifnot(identical(x, y))
  > 
  > x = 1L
  > y = 1:2
  > z = matrix(1:30, 10)
  > 
  > same(mu.size(mu(NULL)), 0)
  > same(mu.size(mu()), 0)
  > same(mu.size(mu(x)), 1)
  > same(mu.size(mu(object.size(x))), unclass(object.size(x)))
  > same(mu.size(mu(y)), unclass(object.size(y)))
  > same(mu.size(mu(z)), unclass(object.size(z)))
  > 
  > same(mu.size(memuse(NULL)), 0)
  > same(mu.size(memuse()), 0)
  > same(mu.size(memuse(x)), 1)
  > same(mu.size(memuse(object.size(x))), unclass(object.size(x)))
  > same(mu.size(memuse(y)), unclass(object.size(y)))
  > same(mu.size(memuse(z)), unclass(object.size(z)))
  > 
  > 
  > 
  > bad = mu()
  > stopifnot(isTRUE(validObject(bad)))
  > 
  > bad@size = -1
  > stopifnot(inherits(try(validObject(bad), silent=TRUE), "try-error"))
  > bad@size = 0
  > 
  > bad@unit = "apple"
  > stopifnot(inherits(try(validObject(bad), silent=TRUE), "try-error"))
  > bad@unit = "b"
  > 
  > bad@unit.prefix = "banana"
  > stopifnot(inherits(try(validObject(bad), silent=TRUE), "try-error"))
  > bad@unit.prefix = "IEC"
  > 
  > bad@unit.names = "orange"
  > stopifnot(inherits(try(validObject(bad), silent=TRUE), "try-error"))
  > 
  > proc.time()
     user  system elapsed 
     0.31    0.06    0.31 
Running the tests in 'tests/converters.r' failed.
Complete output:
  > library(memuse)
  > 
  > n = 2000
  > x = mu(n)
  > 
  > stopifnot(identical(as.memuse(n), x))
  > stopifnot(identical(as.numeric(x), n))
  > stopifnot(identical(as.character(x), "1.953 KiB"))
  > 
  > stopifnot(identical(as.memuse(100), as.memuse("100 b")))
  > 
  > proc.time()
     user  system elapsed 
     0.29    0.01    0.29 
Running the tests in 'tests/howbig.R' failed.
Complete output:
  > library(memuse)
  > 
  > same <- function(a, b) stopifnot(all.equal(a, b))
  > 
  > m = 1000
  > n = 500
  > 
  > hb <- howbig(m, n)
  > same(as.numeric(hb), 4e6)
  > same(mu.size(hb), 4e6/1024/1024)
  > 
  > 
  > 
  > test = howbig(50, 50, representation="sparse", sparsity=.01)
  > truth = mu(200)
  > same(test, truth)
  > 
  > proc.time()
     user  system elapsed 
     0.26    0.06    0.31 
Running the tests in 'tests/howmany.r' failed.
Complete output:
  > library(memuse)
  > 
  > same <- function(a, b) stopifnot(all.equal(a, b))
  > 
  > x = mu(1000000)
  > hm = howmany(x)
  > same(hm, c(353, 353))
  > 
  > hm = howmany(x, 1000)
  > same(hm, c(1000, 125))
  > 
  > hm = howmany(x, ncol=1000)
  > same(hm, c(125, 1000))
  > 
  > proc.time()
     user  system elapsed 
     0.23    0.09    0.31 
Running the tests in 'tests/hr.R' failed.
Complete output:
  > library(memuse)
  > 
  > same = function(x, y) stopifnot(identical(x, y))
  > 
  > x = 1000
  > y = x*10
  > z = y*10
  > 
  > same(as.character(hr(999)), "999")
  > same(as.character(hr(x)), "1,000")
  > same(as.character(hr(y)), "10,000")
  > same(as.character(hr(z)), "100,000")
  > same(as.character(hr(z*10)), "1,000,000")
  > same(as.character(hr(1e20)), "100,000,000,000,000,000,000")
  > 
  > same(as.character(hr(999, names="long")), "999")
  > same(as.character(hr(x, names="long")), "1 Thousand")
  > same(as.character(hr(y, names="long")), "10 Thousand")
  > same(as.character(hr(z, names="long")), "100 Thousand")
  > same(as.character(hr(z*10, names="long")), "1 Million")
  > 
  > same(as.character(hr(999, names="short")), "999")
  > same(as.character(hr(x, names="short")), "1k")
  > same(as.character(hr(y, names="short")), "10k")
  > same(as.character(hr(z, names="short")), "100k")
  > same(as.character(hr(z*10, names="short")), "1m")
  > 
  > proc.time()
     user  system elapsed 
     0.20    0.14    0.32