tests/testthat/test.hardware.R

context("hardwares")

test_that('testing get_ram', {
  ram <- dipsaus::get_ram()
  if(dipsaus::get_os() %in% c("windows", "linux", "darwin")){
    expect(length(ram) == 1 && (is.na(ram) || ram > 0), failure_message = 'RAM is not a positive number')
  } else {
    expect(length(ram) == 1 && is.na(ram), failure_message = 'RAM is not NA')
  }

})

Try the dipsaus package in your browser

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

dipsaus documentation built on July 9, 2023, 5:43 p.m.