assertthat icon indicating copy to clipboard operation
assertthat copied to clipboard

Showing actual value in case of failed assertion

Open ctapobep opened this issue 11 years ago • 1 comments

Example: assert_that(are_equal(as.integer(difftime(d2, d1, units = 'weeks')), 51))

Actual Result:

Error: as.integer(difftime(d2, d1, units = "weeks")) not equal to 51

Expected Result:

Error: as.integer(difftime(d2, d1, units = "weeks")) not equal to 51. Actual value was: 52.

ctapobep avatar Oct 25 '14 08:10 ctapobep

+1

bharris-fs avatar Mar 06 '19 16:03 bharris-fs