[Sciviews-commits] r402 - in pkg/svUnit: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 20 09:57:31 CEST 2011
Author: mariotomo
Date: 2011-09-20 09:57:31 +0200 (Tue, 20 Sep 2011)
New Revision: 402
Modified:
pkg/svUnit/DESCRIPTION
pkg/svUnit/R/runExamples.R
pkg/svUnit/R/svTest.R
Log:
correction: using `names` of list instead of attribute `name` of each list element.
Modified: pkg/svUnit/DESCRIPTION
===================================================================
--- pkg/svUnit/DESCRIPTION 2011-09-20 00:49:03 UTC (rev 401)
+++ pkg/svUnit/DESCRIPTION 2011-09-20 07:57:31 UTC (rev 402)
@@ -4,7 +4,7 @@
Depends: R (>= 1.9.0)
Suggests: svGUI, datasets, utils, XML
Description: A complete unit test system and functions to implement its GUI part
-Version: 0.7-6
+Version: 0.7-7
Date: 2010-09-30
Author: Philippe Grosjean
Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
Modified: pkg/svUnit/R/runExamples.R
===================================================================
--- pkg/svUnit/R/runExamples.R 2011-09-20 00:49:03 UTC (rev 401)
+++ pkg/svUnit/R/runExamples.R 2011-09-20 07:57:31 UTC (rev 402)
@@ -29,7 +29,6 @@
warning=function(w) { checkIdentical(NULL, w) }),
error=function(w) checkIdentical(NULL, w)))
attr(result, 'unit') <- 'examples'
- attr(result, 'name') <- x
result
})
}
Modified: pkg/svUnit/R/svTest.R
===================================================================
--- pkg/svUnit/R/svTest.R 2011-09-20 00:49:03 UTC (rev 401)
+++ pkg/svUnit/R/svTest.R 2011-09-20 07:57:31 UTC (rev 402)
@@ -109,9 +109,9 @@
runTest.list <- function(x, ...) {
## Run each test in x, giving each test the name it has in x
- lapply(x, function(item) {
+ lapply(names(x), function(name) {
+ item <- x[[name]]
unit <- ifelse(is.null(attr(item, "unit")), "**root**", attr(item, "unit"))
- name <- attr(item, "name")
runTest(item, name=name, unit=unit)
})
}
More information about the Sciviews-commits
mailing list