@@ -49,20 +49,24 @@ test_that("guess_geo_type tests for different types of geo_value's",{
4949 # HRR regions
5050 hrr <- c(100 ,200 )
5151
52+ # Long numbers should be custom
53+ long_nums <- c(123456789 ,111222333 )
54+
5255 # Health regions in British Columbia
5356 bc <- c(" Vancouver Coastal" ," Interior" ," Fraser" ,
5457 " Northern" ," Vancouver Island" )
5558
56- # Long numbers as strings that should also be custom
57- long_nums <- c(" 123456789" ," 111222333" )
59+ # Long numbers as strings should also be custom
60+ long_num_strings <- c(" 123456789" ," 111222333" )
5861
5962 expect_equal(guess_geo_type(states )," state" )
6063 expect_equal(guess_geo_type(nations )," nation" )
6164 expect_equal(guess_geo_type(counties )," county" )
6265 expect_equal(guess_geo_type(hhs )," hhs" )
6366 expect_equal(guess_geo_type(hrr )," hrr" )
64- # expect_equal(guess_geo_type(bc),"custom") # EDIT LINE 42
65- # expect_equal(guess_geo_type(long_nums),"custom") # EDIT LINE 45
67+ expect_equal(guess_geo_type(long_num_strings )," custom" )
68+ expect_equal(guess_geo_type(bc )," custom" )
69+ expect_equal(guess_geo_type(long_nums )," custom" )
6670})
6771
6872test_that(" guess_time_type works for different types" ,{
@@ -83,7 +87,7 @@ test_that("guess_time_type works for different types",{
8387 not_a_date <- " asdf"
8488
8589 expect_equal(guess_time_type(days )," day" )
86- # expect_equal(guess_time_type(weeks),"week") # EDIT LINE 82
90+ expect_equal(guess_time_type(weeks )," week" )
8791
8892 expect_equal(guess_time_type(yearweeks )," yearweek" )
8993 expect_equal(guess_time_type(yearmonths )," yearmonth" )
0 commit comments