From 89f424c1a912e630c6133ad2384e2d4ed69d4249 Mon Sep 17 00:00:00 2001 From: "hpages@fhcrc.org" Date: Fri, 11 Nov 2011 10:42:35 +0000 Subject: [PATCH] Update dependencies. git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GenomicRanges@60250 bc3139a8-67e5-0310-9ffc-ced21a209358 --- DESCRIPTION | 2 +- R/test_GenomicRanges_package.R | 49 +--------------------------------- 2 files changed, 2 insertions(+), 49 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7af5631..e17bbce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,7 +10,7 @@ Version: 1.7.3 Author: P. Aboyoun, H. Pages and M. Lawrence Maintainer: Bioconductor Package Maintainer biocViews: Genetics, Sequencing, HighThroughputSequencing, Annotation -Depends: R (>= 2.8.0), methods, BiocGenerics, IRanges (>= 1.11.26) +Depends: R (>= 2.8.0), methods, BiocGenerics (>= 0.1.0), IRanges (>= 1.13.4) Imports: methods, BiocGenerics, IRanges LinkingTo: IRanges Suggests: RUnit, BSgenome, GenomicFeatures, Rsamtools (>= 1.5.66), diff --git a/R/test_GenomicRanges_package.R b/R/test_GenomicRanges_package.R index 639ddda..4bb0db8 100644 --- a/R/test_GenomicRanges_package.R +++ b/R/test_GenomicRanges_package.R @@ -1,48 +1 @@ -.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 -} +.test <- function() BiocGenerics:::testPackage("GenomicRanges")