Skip to content

Commit 6a839f2

Browse files
committed
Failing test noticed!
1 parent 73e7466 commit 6a839f2

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/testthat/test-utils.R

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
test_that("guess_geo_type tests for different types of geo_value's",{
2+
3+
# California, New York
4+
states <- c("ca","ny")
5+
6+
# Canada, USA, United Kingdom
7+
nations <- c("ca","us","uk")
8+
9+
# These are just five-number names that may not necessarily be existent
10+
# counties
11+
counties <- c("12345","67890")
12+
13+
# HHS regions
14+
hhs <- c(1:3)
15+
16+
# HRR regions
17+
hrr <- c(100,200)
18+
19+
# Health regions in British Columbia
20+
bc <- c("Vancouver Coastal","Interior","Fraser",
21+
"Northern","Vancouver Island")
22+
23+
expect_equal(guess_geo_type(states),"state")
24+
expect_equal(guess_geo_type(nations),"nation")
25+
expect_equal(guess_geo_type(counties),"county")
26+
expect_equal(guess_geo_type(hhs),"hhs")
27+
expect_equal(guess_geo_type(hrr),"hrr")
28+
expect_equal(guess_geo_type(bc),"custom") #THIS TEST IS FAILING!!!
29+
30+
})

0 commit comments

Comments
 (0)