Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test("Test with no points", c(), {
expect_equal(1,1)
})

test("Dummy test set to fail", c("r1.7"), {
test("Dummy test set to fail", c(), {
expect_true(FALSE)
expect_equal(1,2)
})
2 changes: 1 addition & 1 deletion example_projects/example_project1/tmc/result.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library('testthat')
llibrary('testthat')
library('jsonlite')

#declaring variables to global environment that for example helperTMC.R can use
Expand Down
2 changes: 2 additions & 0 deletions tmcRtestrunner/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^.*\.Rproj$
^\.Rproj\.user$
13 changes: 13 additions & 0 deletions tmcRtestrunner/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Package: tmcRtestrunner
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.0
Author: Who wrote it
Maintainer: The package maintainer <yourself@somewhere.net>
Description: More about what it does (maybe more than one line)
Use four spaces when indenting paragraphs within the Description.
License: What license is it under?
Encoding: UTF-8
LazyData: true
Depends:
testthat
3 changes: 3 additions & 0 deletions tmcRtestrunner/NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exportPattern("^[[:alpha:]]+")

import(testthat)
20 changes: 20 additions & 0 deletions tmcRtestrunner/R/RunTests.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

runTests <- function(project_path, print = FALSE) {
# Runs the tests from project directory and writes results JSON to the root of the project
# as .tmc_results.json.
#
# Args:
# project_path: The path to the root of the project being tested.
# print: If TRUE, prints results; if not, not. DEFAULT is FALSE.
#


}

.hidden_function <- function() {
}

DummyFunction <- function() {
# A dumy function for testthat testing (before real tests)
return(TRUE)
}
12 changes: 12 additions & 0 deletions tmcRtestrunner/man/hello.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
\name{hello}
\alias{hello}
\title{Hello, World!}
\usage{
hello()
}
\description{
Prints 'Hello, world!'.
}
\examples{

}
4 changes: 4 additions & 0 deletions tmcRtestrunner/tests/testthat.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
library(testthat)
library(tmcRtestrunner)

test_check("tmcRtestrunner")
3 changes: 3 additions & 0 deletions tmcRtestrunner/tests/testthat/testRunTests.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test_that("Dummy test before real tests.", {
expect_true(DummyFunction())
})
20 changes: 20 additions & 0 deletions tmcRtestrunner/tmcRtestrunner.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source