Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Müller committed Apr 16, 2016
1 parent 5700234 commit 933ae45
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/testthat/test-expect-equality.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ test_that("useful message if objects equal but not identical", {
expect_failure(expect_identical(f, g), "not identical")
})


test_that("% is not treated as sprintf format specifier (#445)", {
expect_failure(expect_equal("+", "%"))
expect_failure(expect_equal("%", "+"))
expect_equal("%", "%")
})

test_that("attributes for object (#452)", {
oops <- structure(0, oops = "oops")
expect_equal(oops, oops)
expect_failure(expect_equal(oops, 0))
expect_equal(as.numeric(oops), 0)
})

0 comments on commit 933ae45

Please sign in to comment.