File: test_SerialParam.R

package info (click to toggle)
r-bioc-biocparallel 1.40.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,768 kB
  • sloc: cpp: 139; sh: 14; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 1,120 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
message("Testing SerialParam")

test_SerialParam_bpnworkers <- function() {
    checkIdentical(1L, bpnworkers(SerialParam()))
    checkIdentical(1L, bpnworkers(bpstart(SerialParam())))
    checkIdentical(1L, bpnworkers(bpstop(bpstart(SerialParam()))))
}

test_SerialParam_bpbackend <- function() {
    checkIdentical(NULL, bpbackend(SerialParam()))
    checkTrue(is(bpbackend(bpstart(SerialParam())), "SerialBackend"))
    checkIdentical(NULL, bpbackend(bpstop(bpstart(SerialParam()))))
}

test_SerialParam_bpforceGC <- function() {
    checkIdentical(FALSE, bpforceGC(SerialParam()))
    checkIdentical(FALSE, bpforceGC(SerialParam(force.GC = FALSE)))
    checkIdentical(TRUE, bpforceGC(SerialParam(force.GC = TRUE)))
    checkException(SerialParam(force.GC = NA), silent = TRUE)
    checkException(SerialParam(force.GC = 1:2), silent = TRUE)
}

test_SerialParam_bpisup_start_stop <- function() {
    param <- SerialParam()
    checkIdentical(FALSE, bpisup(param)) # not always up
    param <- bpstart(param)
    checkIdentical(TRUE, bpisup(param))
    param <- bpstop(param)
    checkIdentical(FALSE, bpisup(param))
}