File: test-dim.R

package info (click to toggle)
r-cran-pillar 1.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,840 kB
  • sloc: sh: 13; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
test_that("dim2() falls back to vec_size()", {
  expect_equal(dim2(1:3), 3)
  expect_equal(dim2(Titanic), dim(Titanic))
})

test_that("Using perceived dimensions (#167)", {
  expect_equal(dim_desc(as.POSIXlt(Sys.time() + 1:10)), "10")
  expect_equal(dim_desc(as.POSIXlt(Sys.time() + 1:17)), "17")
})

test_that("big_mark() works for large numbers", {
  expect_match(big_mark(123), "123")
  expect_match(big_mark(123456), "123.456")
  expect_match(big_mark(123456789), "123.456.789")
})