tests/testthat/test-get-bbox.R

context ("get-bbox")

test_that ("latlon", {
           expect_error (get_bbox (), "latlon must be supplied")
           expect_error (get_bbox (-1), "latlon must have length = 4")
           expect_error (get_bbox ("a"), "latlon is not numeric")
           expect_error (get_bbox (NULL), "latlon is not numeric")
           expect_error (get_bbox (NA), "latlon is not numeric")
           expect_error (get_bbox (c (1:3, "a")), "latlon is not numeric")
           expect_warning (get_bbox (1:5), "latlon has length > 4")
})

Try the osmplotr package in your browser

Any scripts or data that you put into this service are public.

osmplotr documentation built on March 28, 2021, 1:09 a.m.