Skip to content

Use conditions for reporting results #360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Feb 19, 2016
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7339f0d
test_that() return ok value from test_code()
Feb 5, 2016
5448986
update ok in enclosing environment
Feb 5, 2016
92aeb39
add test (currently failing for case of test failure)
Feb 5, 2016
6953645
results are handled using conditions and restarts
Feb 5, 2016
68249e8
use report_results() everywhere
Feb 5, 2016
5e105d6
tests for special and new-style expectations
Feb 5, 2016
3d6dd33
use signalCondition if tests passed
Feb 5, 2016
f1018a8
typo
Feb 5, 2016
46795a6
add test for error behavior with bare expectations
Feb 5, 2016
12e8d57
remove commented code
Feb 5, 2016
00d4d90
also test skip()
Feb 5, 2016
8481fd1
check return value in test_test_that()
Feb 5, 2016
0deb2e0
document (unrelated)
Feb 5, 2016
77d51dc
only stop if condition not handled and test didn't pass
Feb 5, 2016
e450fbc
simplify bare tests
Feb 5, 2016
58ab45c
move report_results
Feb 5, 2016
ca3b8b8
use signalCondition() to signal success, and stop() to signal failure
Feb 12, 2016
8424b89
update tests
Feb 12, 2016
84abb46
expectations are now first-class condition objects
Feb 18, 2016
485cbcb
minor refactoring
Feb 18, 2016
371f500
wording
Feb 18, 2016
d9cf5d4
Merge commit 'origin/master~10' into feature/return-value
Feb 19, 2016
ed95622
Merge commit 'origin/master~9' into feature/return-value
Feb 19, 2016
29372d8
Merge commit 'origin/master~5' into feature/return-value
Feb 19, 2016
67c91c9
Merge commit 'origin/master~4' into feature/return-value
Feb 19, 2016
20ac9ea
Merge commit 'origin/master~2' into feature/return-value
Feb 19, 2016
72ba350
Merge commit 'origin/master~1' into feature/return-value
Feb 19, 2016
c3e6137
Merge remote-tracking branch 'origin/master' into feature/return-value
Feb 19, 2016
26b3c41
Merge remote-tracking branch 'origin/master' into feature/return-value
Feb 19, 2016
2b5c28c
get rid of success_msg again
Feb 19, 2016
5b45d70
extract expectation_ok()
Feb 19, 2016
9d62f77
Merge remote-tracking branch 'origin/master' into feature/return-value
Feb 19, 2016
e6b0cd6
NEWS
Feb 19, 2016
cfd0489
move test
Feb 19, 2016
116e60d
usage of expectation_ok()
Feb 19, 2016
d1fb341
oops
Feb 19, 2016
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
Prev Previous commit
Next Next commit
only stop if condition not handled and test didn't pass
  • Loading branch information
Kirill Müller committed Feb 5, 2016
commit 77d51dce52f95e19502eb414593ca83e09dc5bc6
7 changes: 6 additions & 1 deletion R/expect-that.r
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ report_results <- function(results) {
class = c("test_result", "condition"))

withRestarts(
if (results$passed) signalCondition(cond) else stop(cond),
{
signalCondition(cond)
if (!results$passed) {
stop(format(results), call. = FALSE)
}
},
continue_test = function(e) NULL
)

Expand Down