Browse Source

tweak tests

delete
boB Rudis 7 years ago
parent
commit
3cdd60112a
No known key found for this signature in database GPG Key ID: 2A514A4997464560
  1. 2
      README.md
  2. 7
      tests/testthat/test-mgrs.R

2
README.md

@ -114,7 +114,7 @@ library(testthat)
date()
```
## [1] "Sun Apr 9 22:43:31 2017"
## [1] "Sun Apr 9 22:44:37 2017"
``` r
test_dir("tests/")

7
tests/testthat/test-mgrs.R

@ -1,5 +1,5 @@
context("basic functionality")
test_that("we can do something", {
context("coordinate conversion")
test_that("we can convert things", {
expect_equal(mgrs_to_latlng("33UXP04"),
structure(c(48.2053484084679, 16.3459269599006),
@ -25,8 +25,7 @@ test_that("we can do something", {
structure(list(mgrs = "48PUV7729883034", zone = 48, hemisphere = "N",
easting = 377298, northing = 1483034),
.Names = c("mgrs", "zone", "hemisphere", "easting", "northing"),
row.names = c(NA,
-1L), class = "data.frame"))
row.names = c(NA, -1L), class = "data.frame"))
expect_equal(ups_to_mgrs("N", 2426773, 1530125), "ZGC2677330125")

Loading…
Cancel
Save