Skip to content

Commit

Permalink
demonstrate actual failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Müller committed Mar 4, 2016
1 parent fe2ea0e commit 51df2e8
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/reporters/check.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stop
1: stop("stop") at reporters/tests.R:28

testthat results ================================================================
OK: 5 SKIPPED: 2 FAILED: 6
OK: 7 SKIPPED: 2 FAILED: 6
1. Failure: Failure:1 (@tests.R#8)
2. Failure: Failure:2a (@tests.R#12)
3. Failure: Failure:2b (@tests.R#15)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/reporters/minimal.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.FFFF.ESSWWW
.FFFF.ESSWWWF
6 changes: 6 additions & 0 deletions tests/testthat/reporters/summary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Expectations: .1234.
Errors: 5
Skips: SS
Warnings: WWW
Promises: 7

Skipped --------------------------------------------------------------------
1. Skip:1 (@tests.R#42) - skip
Expand Down Expand Up @@ -51,4 +52,9 @@ stop
8: h() at reporters/tests.R:33
9: stop("!") at reporters/tests.R:34

7. Failure: Promises:1 (@tests.R#64) -------------------------------------------
expect_false(FALSE) produced output.
.


DONE =======================================================================
5 changes: 4 additions & 1 deletion tests/testthat/reporters/tap.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1..13
1..15
# Context Expectations
ok 1 Success
not ok 2 Failure:1
Expand Down Expand Up @@ -39,3 +39,6 @@ ok 10 # SKIP skip
ok 11 # WARNING abc
ok 12 # WARNING def
ok 13 # WARNING ghi
# Context Promises
ok 14 Promises:1
ok 15 Promises:1
10 changes: 10 additions & 0 deletions tests/testthat/reporters/teamcity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,13 @@
##teamcity[testSuiteFinished name='Warnings']


##teamcity[testSuiteStarted name='Promises']
##teamcity[testSuiteStarted name='Promises:1']
##teamcity[testStarted name='expectation 2']
##teamcity[testFailed name='expectation 2' message='expect_false(FALSE) produced output.' details='##teamcity|[testStarted name=|'expectation 1|'|]\n##teamcity|[testFinished name=|'expectation 1|'|]']
##teamcity[testFinished name='expectation 2']
##teamcity[testSuiteFinished name='Promises:1']

##teamcity[testSuiteFinished name='Promises']


6 changes: 6 additions & 0 deletions tests/testthat/reporters/tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ test_that("Warning:2", {
warning("def")
warning("ghi")
})

context("Promises")

test_that("Promises:1", {
expect_output(expect_false(FALSE), NA)
})

0 comments on commit 51df2e8

Please sign in to comment.