[Swift-commit] r4124 - in SwiftApps/SwiftR/Swift: . R
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Feb 21 14:55:42 CST 2011
Author: tga
Date: 2011-02-21 14:55:41 -0600 (Mon, 21 Feb 2011)
New Revision: 4124
Modified:
SwiftApps/SwiftR/Swift/NAMESPACE
SwiftApps/SwiftR/Swift/R/Tests.R
Log:
Added in option to pass swiftInit parameters directly to test runner functions to save unnecessary option setting.
Modified: SwiftApps/SwiftR/Swift/NAMESPACE
===================================================================
--- SwiftApps/SwiftR/Swift/NAMESPACE 2011-02-19 21:45:03 UTC (rev 4123)
+++ SwiftApps/SwiftR/Swift/NAMESPACE 2011-02-21 20:55:41 UTC (rev 4124)
@@ -22,7 +22,6 @@
export(basicSwiftTest)
exportPattern("^swiftTest")
exportPattern("^testGroup")
-export(swiftTestSuite)
export(mkPerfTest)
export(doPerfTest)
Modified: SwiftApps/SwiftR/Swift/R/Tests.R
===================================================================
--- SwiftApps/SwiftR/Swift/R/Tests.R 2011-02-19 21:45:03 UTC (rev 4123)
+++ SwiftApps/SwiftR/Swift/R/Tests.R 2011-02-21 20:55:41 UTC (rev 4124)
@@ -9,8 +9,8 @@
-basicSwiftTest <- function() {
- swiftInit()
+basicSwiftTest <- function(...) {
+ swiftInit(...)
swiftTest_1.1()
swiftShutdown()
}
@@ -595,12 +595,12 @@
}
-runAllSwiftTests <- function() {
+runAllSwiftTests <- function(...) {
startTime = proc.time()[["elapsed"]]
- runTestSuite(swiftTestSuite)
+ runTestSuite(makeFullTestSuite(...))
endTime <- proc.time()[["elapsed"]]
runTime <- endTime - startTime
@@ -656,11 +656,12 @@
tests = list(mkTest(swiftTest_5.1)))
-
-swiftTestSuite <- makeTestSuite(
+makeFullTestSuite <- function (...) {
+ initArgs <- list(...)
+ makeTestSuite(
setup=function () { initSwiftTestOptions();
- swiftInit() }, # swiftInit controlled via options
+ do.call(swiftInit, initArgs) }, # swiftInit controlled via options
groups=list(testGroup1.1, testGroup2, testGroup1.2, testGroup1.3, testGroup3, testGroup4,
testGroup5),
teardown=function () { swiftShutdown() })
-
+}
More information about the Swift-commit
mailing list