File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11test_that(" `fancy_scientific()` converts numbers to scientific expressions with proper formatting" , {
22 result <- fancy_scientific(1234567890 )
3- expect_equal(result , expression(" 1.234568" %*% 10 ^+ 9 ))
3+ expected <- expression(" 1.234568" %*% 10 ^+ 9 )
4+ expect_equal(deparse(result [[1 ]]), deparse(expected [[1 ]]))
45
56 result <- fancy_scientific(0.00000123 )
6- expect_equal(result , expression(" 1.23" %*% 10 ^- 6 ))
7+ expected <- expression(" 1.23" %*% 10 ^- 6 )
8+ expect_equal(deparse(result [[1 ]]), deparse(expected [[1 ]]))
79
810 result <- fancy_scientific(1e-20 )
9- expect_equal(result , expression(" 1" %*% 10 ^- 20 ))
11+ expected <- expression(" 1" %*% 10 ^- 20 )
12+ expect_equal(deparse(result [[1 ]]), deparse(expected [[1 ]]))
1013})
1114
1215test_that(" `dplyr.count()` returns the correct count of rows in a dataframe" , {
You can’t perform that action at this time.
0 commit comments