v0.9.1 : expected behaviour
> expect_equal(415, 416, 0.01)
> expect_equal(415, 416, tolerance=0.01)
v0.10.0 May 2015, currently on CRAN
> expect_equal(415, 416, 0.01) # 0.01 silently not passed on to all.equal, apparently
Error: 415 not equal to 416
416 - 415 == 1
> expect_equal(415, 416, tolerance=0.01) # tolerance= now required.
We all know we should always name our arguments. Anyone who hasn't may now be bitten by this when they upgrade. It's the silent apparent ignoring of the 3rd argument that's confusing. ?expect_equals contains ... = other values passed to all.equal and when you then look at ?all.equal it seems reasonable to assume the 3rd argument matches up with the 3rd argument of all.equal (i.e. tolerance).
A few solutions I can think of are i) restoring previous behaviour, ii) catch and warn/error about any unnamed arguments or iii) add to ?expect_equals that tolerance must now be explicitly named.
v0.9.1 : expected behaviour
v0.10.0 May 2015, currently on CRAN
We all know we should always name our arguments. Anyone who hasn't may now be bitten by this when they upgrade. It's the silent apparent ignoring of the 3rd argument that's confusing.
?expect_equalscontains... = other values passed to all.equaland when you then look at?all.equalit seems reasonable to assume the 3rd argument matches up with the 3rd argument ofall.equal(i.e.tolerance).A few solutions I can think of are i) restoring previous behaviour, ii) catch and warn/error about any unnamed arguments or iii) add to
?expect_equalsthattolerancemust now be explicitly named.