Running ‘testthat.R’ [17s/15s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dialr)
  > 
  > test_check("dialr")
  ── 1. Failure: get_carrier (@test-carrier.R#7)  ────────────────────────────────
  get_carrier(phone(ph_raw, "AU")) not equal to c(NA, "", "Optus", "Optus", "", "").
  5/6 mismatches
  x[2]: NA
  y[2]: ""
  
  x[3]: NA
  y[3]: "Optus"
  
  x[4]: NA
  y[4]: "Optus"
  
  x[5]: NA
  y[5]: ""
  
  x[6]: NA
  y[6]: ""
  
  ── 2. Failure: get_carrier (@test-carrier.R#10)  ───────────────────────────────
  get_carrier(phone(ph_raw, "AU"), strict = TRUE) not equal to c(NA, NA, "Optus", "Optus", "", "").
  4/6 mismatches
  x[3]: NA
  y[3]: "Optus"
  
  x[4]: NA
  y[4]: "Optus"
  
  x[5]: NA
  y[5]: ""
  
  x[6]: NA
  y[6]: ""
  
  ── 3. Failure: get_carrier (@test-carrier.R#13)  ───────────────────────────────
  get_carrier(phone(ph_raw, "AU"), safe = TRUE) not equal to c(NA, NA, "", "", "", "").
  4/6 mismatches
  x[3]: NA
  y[3]: ""
  
  x[4]: NA
  y[4]: ""
  
  x[5]: NA
  y[5]: ""
  
  x[6]: NA
  y[6]: ""
  
  ── 4. Error: all regions return valid example numbers (@test-example.R#4)  ─────
  Java Exception <no description because toString() failed>.jcall("RJavaTools", "Z", "hasClass", .jcast(x, "java/lang/Object"), name)new("jobjRef", jobj = <pointer: 0x4829130>, jclass = "java/lang/Throwable")
  1: expect_true(all(is_possible(get_example(regions)))) at testthat/test-example.R:4
  2: quasi_label(enquo(object), label, arg = "object")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: is_possible(get_example(regions))
  5: is.phone(x)
  6: get_example(regions)
  7: .get_phone_format_from_string("E164")
  8: validate_phone_format(x)
  9: .get_phoneNumberFormat()
  10: gsub("^.*\\.", "", .jfields(.get_phoneNumberUtil()$PhoneNumberFormat))
  11: .jfields(.get_phoneNumberUtil()$PhoneNumberFormat)
  12: is(o, "jobjRef")
  13: .get_phoneNumberUtil()$PhoneNumberFormat
  14: .get_phoneNumberUtil()$PhoneNumberFormat
  15: hasClass(x, name)
  16: .jcall("RJavaTools", "Z", "hasClass", .jcast(x, "java/lang/Object"), name)
  17: .jcheck()
  18: stop(list(message = "Java Exception <no description because toString() failed>", 
         call = .jcall("RJavaTools", "Z", "hasClass", .jcast(x, "java/lang/Object"), name), 
         jobj = new("jobjRef", jobj = <pointer: 0x4829130>, jclass = "java/lang/Throwable")))
  
  ── 5. Failure: get_geocode (@test-geocoder.R#7)  ───────────────────────────────
  get_geocode(phone(ph_raw, "AU")) not equal to c(NA, "", "", "", "Melbourne", "New Jersey").
  5/6 mismatches
  x[2]: NA
  y[2]: ""
  
  x[3]: NA
  y[3]: ""
  
  x[4]: NA
  y[4]: ""
  
  x[5]: NA
  y[5]: "Melbourne"
  
  x[6]: NA
  y[6]: "New Jersey"
  
  ── 6. Failure: get_geocode (@test-geocoder.R#9)  ───────────────────────────────
  get_geocode(phone(ph_raw, "AU"), home = "AU") not equal to c(NA, "", "", "", "Melbourne", "United States").
  5/6 mismatches
  x[2]: NA
  y[2]: ""
  
  x[3]: NA
  y[3]: ""
  
  x[4]: NA
  y[4]: ""
  
  x[5]: NA
  y[5]: "Melbourne"
  
  x[6]: NA
  y[6]: "United States"
  
  ── 7. Failure: get_geocode (@test-geocoder.R#11)  ──────────────────────────────
  get_geocode(phone(ph_raw, "AU"), home = "US") not equal to c(NA, "", "Australia", "Australia", "Australia", "New Jersey").
  5/6 mismatches
  x[2]: NA
  y[2]: ""
  
  x[3]: NA
  y[3]: "Australia"
  
  x[4]: NA
  y[4]: "Australia"
  
  x[5]: NA
  y[5]: "Australia"
  
  x[6]: NA
  y[6]: "New Jersey"
  
  ── 8. Failure: get_geocode (@test-geocoder.R#13)  ──────────────────────────────
  get_geocode(phone(ph_raw, "AU"), locale = "in", home = "IN") not equal to c(NA, "", "Australia", "Australia", "Australia", "Amerika Serikat").
  5/6 mismatches
  x[2]: NA
  y[2]: ""
  
  x[3]: NA
  y[3]: "Australia"
  
  x[4]: NA
  y[4]: "Australia"
  
  x[5]: NA
  y[5]: "Australia"
  
  x[6]: NA
  y[6]: "Amerika Serikat"
  
  ── 9. Failure: get_geocode (@test-geocoder.R#16)  ──────────────────────────────
  get_geocode(phone(ph_raw, "AU"), strict = TRUE) not equal to c(NA, NA, "", "", "Melbourne", "New Jersey").
  4/6 mismatches
  x[3]: NA
  y[3]: ""
  
  x[4]: NA
  y[4]: ""
  
  x[5]: NA
  y[5]: "Melbourne"
  
  x[6]: NA
  y[6]: "New Jersey"
  
  ── 10. Failure: get_region (@test-get.R#12)  ───────────────────────────────────
  get_region(phone(ph_raw, "AU")) not equal to `ph_raw_regions`.
  4/6 mismatches
  x[3]: NA
  y[3]: "AU"
  
  x[4]: NA
  y[4]: "AU"
  
  x[5]: NA
  y[5]: "AU"
  
  x[6]: NA
  y[6]: "US"
  
  ── 11. Error: (unknown) (@test-get.R#18)  ──────────────────────────────────────
  no field, method or inner class called 'handled' 
  1: test_that("get_region_for_calling_code", {
         expect_error(get_region_for_calling_code(FALSE))
         expect_is(get_region_for_calling_code(cc), "character")
         expect_match(get_region_for_calling_code(cc), "^[A-Z]{2}$")
     }) at testthat/test-get.R:18
  2: test_code(desc, code, env = parent.frame())
  3: tryCatch(withCallingHandlers({
         eval(code, test_env)
         if (!handled && !is.null(test)) {
             skip_empty()
         }
     }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
         message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) {
     })
  4: tryCatchList(expr, classes, parentenv, handlers)
  5: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], 
         parentenv, handlers[[nh]])
  6: doTryCatch(return(expr), name, parentenv, handler)
  7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  10: isTRUE(e$handled)
  11: e$handled
  12: `$.Throwable`(e, "handled")
  13: ._jobjRef_dollar(x[["jobj"]], name)
  14: stop(sprintf("no field, method or inner class called '%s' ", name))
  
  ── 12. Failure: matches correctly (@test-match.R#4)  ───────────────────────────
  is_match(...) not equal to TRUE.
  'is.NA' value mismatch: 0 in current 1 in target
  
  ── 13. Failure: matches correctly (@test-match.R#7)  ───────────────────────────
  is_match(phone("0412345678", "AU"), phone("0412345678", "US")) not equal to FALSE.
  'is.NA' value mismatch: 0 in current 1 in target
  
  ── 14. Failure: matches correctly (@test-match.R#10)  ──────────────────────────
  is_match(...) not equal to TRUE.
  'is.NA' value mismatch: 0 in current 1 in target
  
  ── 15. Failure: successfully runs for all combinations of input type (@test-matc
  is_match(phone("0412345678", "AU"), phone("0412345678", "AU")) not identical to TRUE.
  'is.NA' value mismatch: 0 in current 1 in target
  
  ── 16. Failure: successfully runs for all combinations of input type (@test-matc
  is_match("+61412345678", phone("0412345678", "AU")) not identical to TRUE.
  'is.NA' value mismatch: 0 in current 1 in target
  
  ── 17. Failure: successfully runs for all combinations of input type (@test-matc
  is_match(phone("0412345678", "AU"), "+61412345678") not identical to TRUE.
  'is.NA' value mismatch: 0 in current 1 in target
  
  ── 18. Failure: phone vector created successfully (@test-phone.R#22)  ──────────
  phone(ph_raw, "AU") not equal to `ph`.
  Component 2: Component 3: Modes: logical, S4
  Component 2: Component 3: names for current but not for target
  Component 2: Component 3: Attributes: < target is NULL, current is list >
  Component 2: Component 3: target is logical, current is jobjRef
  Component 3: Component 3: Modes: logical, S4
  Component 3: Component 3: names for current but not for target
  Component 3: Component 3: Attributes: < target is NULL, current is list >
  Component 3: Component 3: target is logical, current is jobjRef
  Component 4: Component 3: Modes: logical, S4
  ...
  
  ── 19. Failure: empty region parses correctly (@test-phone.R#27)  ──────────────
  is_parsed(phone("+61412345678", NA)) isn't true.
  
  ── 20. Failure: empty region parses correctly (@test-phone.R#28)  ──────────────
  is_possible(phone("+61412345678", NA)) isn't true.
  
  ── 21. Failure: empty region parses correctly (@test-phone.R#29)  ──────────────
  is_valid(phone("+61412345678", NA)) isn't true.
  
  ── 22. Failure: format (@test-phone.R#59)  ─────────────────────────────────────
  format(ph_fmt, "E164", clean = TRUE) not equal to "+61412345678".
  1/1 mismatches
  x[1]: NA
  y[1]: "+61412345678"
  
  ── 23. Failure: format (@test-phone.R#60)  ─────────────────────────────────────
  format(ph_fmt, "NATIONAL", clean = TRUE) not equal to "0412345678".
  1/1 mismatches
  x[1]: NA
  y[1]: "0412345678"
  
  ── 24. Failure: format (@test-phone.R#61)  ─────────────────────────────────────
  format(ph_fmt, "INTERNATIONAL", clean = TRUE) not equal to "+61412345678".
  1/1 mismatches
  x[1]: NA
  y[1]: "+61412345678"
  
  ── 25. Failure: format (@test-phone.R#62)  ─────────────────────────────────────
  format(ph_fmt, "RFC3966", clean = TRUE) not equal to "+61412345678".
  1/1 mismatches
  x[1]: NA
  y[1]: "+61412345678"
  
  ── 26. Failure: format (@test-phone.R#64)  ─────────────────────────────────────
  format(ph_fmt, "E164", clean = FALSE) not equal to "+61412345678".
  1/1 mismatches
  x[1]: NA
  y[1]: "+61412345678"
  
  ── 27. Failure: format (@test-phone.R#65)  ─────────────────────────────────────
  format(ph_fmt, "NATIONAL", clean = FALSE) not equal to "0412 345 678".
  1/1 mismatches
  x[1]: NA
  y[1]: "0412 345 678"
  
  ── 28. Failure: format (@test-phone.R#66)  ─────────────────────────────────────
  format(ph_fmt, "INTERNATIONAL", clean = FALSE) not equal to "+61 412 345 678".
  1/1 mismatches
  x[1]: NA
  y[1]: "+61 412 345 678"
  
  ── 29. Failure: format (@test-phone.R#67)  ─────────────────────────────────────
  format(ph_fmt, "RFC3966", clean = FALSE) not equal to "tel:+61-412-345-678".
  1/1 mismatches
  x[1]: NA
  y[1]: "tel:+61-412-345-678"
  
  ── 30. Failure: format (@test-phone.R#69)  ─────────────────────────────────────
  format(ph_fmt, home = "US") not equal to "01161412345678".
  1/1 mismatches
  x[1]: NA
  y[1]: "01161412345678"
  
  ── 31. Failure: format (@test-phone.R#70)  ─────────────────────────────────────
  format(ph_fmt, home = "GB") not equal to "0061412345678".
  1/1 mismatches
  x[1]: NA
  y[1]: "0061412345678"
  
  ── 32. Failure: format (@test-phone.R#71)  ─────────────────────────────────────
  format(ph_fmt, home = "US", clean = FALSE) not equal to "011 61 412 345 678".
  1/1 mismatches
  x[1]: NA
  y[1]: "011 61 412 345 678"
  
  ── 33. Failure: format (@test-phone.R#72)  ─────────────────────────────────────
  format(ph_fmt, home = "GB", clean = FALSE) not equal to "00 61 412 345 678".
  1/1 mismatches
  x[1]: NA
  y[1]: "00 61 412 345 678"
  
  ── 34. Failure: format (@test-phone.R#74)  ─────────────────────────────────────
  format(phone("123", "AU")) not equal to "+61123".
  1/1 mismatches
  x[1]: NA
  y[1]: "+61123"
  
  ── 35. Failure: phone subset (@test-phone.R#87)  ───────────────────────────────
  ph[1:3] not equal to phone(ph_raw[1:3], "AU").
  Component 2: Component 3: Modes: S4, logical
  Component 2: Component 3: names for target but not for current
  Component 2: Component 3: Attributes: < Modes: list, NULL >
  Component 2: Component 3: Attributes: < Lengths: 3, 0 >
  Component 2: Component 3: Attributes: < names for target but not for current >
  Component 2: Component 3: Attributes: < current is not list-like >
  Component 3: Component 3: Modes: S4, logical
  Component 3: Component 3: names for target but not for current
  Component 3: Component 3: Attributes: < Modes: list, NULL >
  ...
  
  ── 36. Failure: phone concatenation (@test-phone.R#123)  ───────────────────────
  c(ph, ph) not equal to phone(c(ph_raw, ph_raw), "AU").
  Component 2: Component 3: Modes: S4, logical
  Component 2: Component 3: names for target but not for current
  Component 2: Component 3: Attributes: < Modes: list, NULL >
  Component 2: Component 3: Attributes: < Lengths: 3, 0 >
  Component 2: Component 3: Attributes: < names for target but not for current >
  Component 2: Component 3: Attributes: < current is not list-like >
  Component 3: Component 3: Modes: S4, logical
  Component 3: Component 3: names for target but not for current
  Component 3: Component 3: Attributes: < Modes: list, NULL >
  ...
  
  ── 37. Failure: get_timezone (@test-timezone.R#7)  ─────────────────────────────
  get_timezone(phone(ph_raw, "AU")) not equal to `ph_raw_timezone`.
  5/6 mismatches
  x[2]: NA
  y[2]: "Australia/Adelaide;Australia/Eucla;Australia/Lord_Howe;Australia/Perth;Au
  y[2]: stralia/Sydney;Indian/Christmas;Indian/Cocos"
  
  x[3]: NA
  y[3]: "Australia/Adelaide;Australia/Eucla;Australia/Lord_Howe;Australia/Perth;Au
  y[3]: stralia/Sydney;Indian/Christmas;Indian/Cocos"
  
  x[4]: NA
  y[4]: "Australia/Adelaide;Australia/Eucla;Australia/Lord_Howe;Australia/Perth;Au
  y[4]: stralia/Sydney;Indian/Christmas;Indian/Cocos"
  
  x[5]: NA
  y[5]: "Australia/Sydney"
  
  x[6]: NA
  y[6]: "America/New_York"
  
  ── 38. Failure: get_timezone (@test-timezone.R#8)  ─────────────────────────────
  get_timezone(phone(ph_raw, "AU"), strict = TRUE) not equal to `ph_raw_timezone_strict`.
  4/6 mismatches
  x[3]: NA
  y[3]: "Australia/Adelaide;Australia/Eucla;Australia/Lord_Howe;Australia/Perth;Au
  y[3]: stralia/Sydney;Indian/Christmas;Indian/Cocos"
  
  x[4]: NA
  y[4]: "Australia/Adelaide;Australia/Eucla;Australia/Lord_Howe;Australia/Perth;Au
  y[4]: stralia/Sydney;Indian/Christmas;Indian/Cocos"
  
  x[5]: NA
  y[5]: "Australia/Sydney"
  
  x[6]: NA
  y[6]: "America/New_York"
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 94 SKIPPED: 0 WARNINGS: 0 FAILED: 38
  1. Failure: get_carrier (@test-carrier.R#7) 
  2. Failure: get_carrier (@test-carrier.R#10) 
  3. Failure: get_carrier (@test-carrier.R#13) 
  4. Error: all regions return valid example numbers (@test-example.R#4) 
  5. Failure: get_geocode (@test-geocoder.R#7) 
  6. Failure: get_geocode (@test-geocoder.R#9) 
  7. Failure: get_geocode (@test-geocoder.R#11) 
  8. Failure: get_geocode (@test-geocoder.R#13) 
  9. Failure: get_geocode (@test-geocoder.R#16) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted