forked from jimhester/GenomicRanges
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GenomicRanges@45528 bc3139a8-67e5-0310-9ffc-ced21a209358
- Loading branch information
p.aboyoun
committed
Mar 26, 2010
1 parent
8e72d66
commit aff579c
Showing
11 changed files
with
51 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ Collate: seqnames.R | |
Alignments0-class.R | ||
Alignments1-class.R | ||
Alignments2-class.R | ||
test_GenomicRanges_package.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.test <- function(dir, pattern = "^test_.*\\.R$") | ||
{ | ||
.failure_details <- function(result) { | ||
res <- result[[1L]] | ||
if (res$nFail > 0 || res$nErr > 0) { | ||
Filter(function(x) length(x) > 0, | ||
lapply(res$sourceFileResults, | ||
function(fileRes) { | ||
names(Filter(function(x) x$kind != "success", | ||
fileRes)) | ||
})) | ||
} else list() | ||
} | ||
|
||
if (missing(dir)) { | ||
dir <- system.file("unitTests", package="GenomicRanges") | ||
if (!length(dir)) { | ||
dir <- system.file("UnitTests", package="GenomicRanges") | ||
if (!length(dir)) | ||
stop("unable to find unit tests, no 'unitTests' dir") | ||
} | ||
} | ||
require("RUnit", quietly=TRUE) || stop("RUnit package not found") | ||
RUnit_opts <- getOption("RUnit", list()) | ||
RUnit_opts$verbose <- 0L | ||
RUnit_opts$silent <- TRUE | ||
RUnit_opts$verbose_fail_msg <- TRUE | ||
options(RUnit = RUnit_opts) | ||
suite <- defineTestSuite(name="GenomicRanges RUnit Tests", dirs=dir, | ||
testFileRegexp=pattern, | ||
rngKind="default", | ||
rngNormalKind="default") | ||
result <- runTestSuite(suite) | ||
cat("\n\n") | ||
printTextProtocol(result, showDetails=FALSE) | ||
if (length(details <- .failure_details(result)) >0) { | ||
cat("\nTest files with failing tests\n") | ||
for (i in seq_along(details)) { | ||
cat("\n ", basename(names(details)[[i]]), "\n") | ||
for (j in seq_along(details[[i]])) { | ||
cat(" ", details[[i]][[j]], "\n") | ||
} | ||
} | ||
cat("\n\n") | ||
stop("unit tests failed for package GenomicRanges") | ||
} | ||
result | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require("GenomicRanges") || stop("unable to load GenomicRanges package") | ||
GenomicRanges:::.test() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.