File: test_integer.R

package info (click to toggle)
r-cran-rcpptoml 0.2.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 280 kB
  • sloc: cpp: 204; sh: 14; makefile: 2
file content (16 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
16

library(RcppTOML)

toml <- parseToml("integer.toml")

expect_equal(names(toml), c("integer"))
expect_equal(names(toml$integer), c("key1", "key2", "key3", "key4", "underscores"))

expect_equal(toml$integer$key1, 99L)
expect_equal(toml$integer$key2, 42L)
expect_equal(toml$integer$key3, 0L)
expect_equal(toml$integer$key4, -17L)

expect_equal(toml$integer$underscores$key1, 1000L)
expect_equal(toml$integer$underscores$key2, 5349221L)
expect_equal(toml$integer$underscores$key3, 12345L)