boB Rudis
7 years ago
7 changed files with 210 additions and 46 deletions
@ -0,0 +1,25 @@ |
|||
# Contributor Code of Conduct |
|||
|
|||
As contributors and maintainers of this project, we pledge to respect all people who |
|||
contribute through reporting issues, posting feature requests, updating documentation, |
|||
submitting pull requests or patches, and other activities. |
|||
|
|||
We are committed to making participation in this project a harassment-free experience for |
|||
everyone, regardless of level of experience, gender, gender identity and expression, |
|||
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. |
|||
|
|||
Examples of unacceptable behavior by participants include the use of sexual language or |
|||
imagery, derogatory comments or personal attacks, trolling, public or private harassment, |
|||
insults, or other unprofessional conduct. |
|||
|
|||
Project maintainers have the right and responsibility to remove, edit, or reject comments, |
|||
commits, code, wiki edits, issues, and other contributions that are not aligned to this |
|||
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed |
|||
from the project team. |
|||
|
|||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by |
|||
opening an issue or contacting one or more of the project maintainers. |
|||
|
|||
This Code of Conduct is adapted from the Contributor Covenant |
|||
(http:contributor-covenant.org), version 1.0.0, available at |
|||
http://contributor-covenant.org/version/1/0/0/ |
@ -1,6 +1,39 @@ |
|||
context("basic functionality") |
|||
test_that("we can do something", { |
|||
|
|||
#expect_that(some_function(), is_a("data.frame")) |
|||
expect_equal(mgrs_to_latlng("33UXP04"), |
|||
structure(c(48.2053484084679, 16.3459269599006), |
|||
.Names = c("lat", "lng"))) |
|||
|
|||
expect_equal(latlng_to_mgrs(48.20535, 16.34593), "33UXP0000040000") |
|||
|
|||
expect_equal(mgrs_to_latlng("33UXP0500444996"), |
|||
structure(c(48.2494747750754, 16.4144942785798), |
|||
.Names = c("lat", "lng"))) |
|||
|
|||
expect_equal(latlng_to_mgrs(48.24948, 16.41449), "33UXP0500344996") |
|||
|
|||
expect_equal(mgrs_to_latlng("24XWT783908"), |
|||
structure(c(83.6273817605432, -32.6687891809823), |
|||
.Names = c("lat", "lng"))) |
|||
|
|||
expect_equal(latlng_to_mgrs(83.62738, -32.66879), "25XEN0410486507") |
|||
|
|||
expect_equal(utm_to_mgrs(48, "N", 377299, 1483035), "48PUV7729983035") |
|||
|
|||
expect_equal(mgrs_to_utm("48PUV7729883034"), |
|||
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")) |
|||
|
|||
expect_equal(ups_to_mgrs("N", 2426773, 1530125), "ZGC2677330125") |
|||
|
|||
expect_equal(mgrs_to_ups("ZGC2677330125"), |
|||
structure(list(mgrs = "ZGC2677330125", hemisphere = "N", easting = 2426773, |
|||
northing = 1530125), .Names = c("mgrs", "hemisphere", |
|||
"easting", "northing"), |
|||
row.names = c(NA, -1L), class = "data.frame")) |
|||
|
|||
}) |
|||
|
Loading…
Reference in new issue