test is_na with a character input and coercion returns true when not 'T' or 'F'

test is_na with a complex input and coercion returns true when not NA

test is_na with a list input and coercion throw an error

`is_na(x, coerce_to_logical = TRUE)` threw an error with unexpected message.
Expected match: "x cannot be coerced to any of these types: .logical.\\."
Actual message: "x cannot be coerced to any of these types: ‘logical’."

`actual` not equal to `expected`.
Component “function() {}”: Names: 2 string mismatches
Component “function() {}”: Length mismatch: comparison on first 2 components
Component “function() {}”: Component 1: Modes of target, current: name, list
Component “function() {}”: Component 1: target, current do not match when deparsed
Component “function() {}”: Component 2: Component “function() {}”: Modes of target, current: call, function
Component “function() {}”: Component 2: Component “function() {}”: target, current do not match when deparsed

"to_names with a character vector returns unquoted character names",
"to_names with a (double) numeric vector returns 17 sig fig 'g' formatting",
x <- with(.Machine, c(1 + double.eps, double.xmax, double.xmin, NaN, -Inf, NA))
expected <- ifelse(is.na(x), NA_real_, sprintf("%.17g", x))
"to_names with a complex vector returns returns 17 sig fig 'g' formatting for each component",
x <-  with(.Machine, c(1 + double.eps, double.xmax, double.xmin, NaN, -Inf, NA)) * (1 + 1i)
expected <- ifelse(is.na(x), NA_complex_, sprintf("%.17g+%.17gi", Re(x), Im(x)))
"to_names with a list input returns deparsed object",
x <- list(NA, 1 + .Machine$double.eps, "abc", list(Inf, list("def", NA)))
"dont_stop with multiple errors and warnings successfully runs",
'stop("If you don\'t stop;")' = simpleError("If you don't stop;"),
'warning("Someone\'s gonna find yo\' ass dead (this is a warning)")' = simpleWarning("Someone's gonna find yo' ass dead (this is a warning)"),
'warning("Someone\'s gonna poison your food (this is a warning)")' = simpleWarning("Someone's gonna poison your food (this is a warning)"),
'stop("Don\'t stop, no no, you\'ll be sorry")' = simpleError("Don\'t stop, no no, you\'ll be sorry"),
'stop("Don\'t stop, thinking about tomorrow")' = simpleError("Don't stop, thinking about tomorrow"),
'stop("Don\'t stop, it\'ll soon be here")' = simpleError("Don't stop, it'll soon be here")
warning("Someone's gonna find yo' ass dead (this is a warning)")
warning("Someone's gonna poison your food (this is a warning)")
stop("Don't stop, no no, you'll be sorry")
# Bonus errors for David, Jenny and other Fleetwood Mac fans
stop("Don't stop, thinking about tomorrow")
"dont_stop works with objects that don't deparse to a single string",
expected <- list("function() {}" = function() {})
# don't test for identicality due to function environment
"get_name_in_parent works when object exists outside of function",
"get_name_in_parent works when object doesn't exist outside of function",
"get_name_in_parent works with percent inside function call, escape_percent = TRUE",
"get_name_in_parent works with percent inside function call, escape_percent = FALSE",
"merge_dots_with_list takes duplicates from ...",
expected <- list(x = 1, y = "b", z = TRUE)
actual <- merge_dots_with_list(x = 1, y = "b", l = list(y = "c", z = TRUE)),
"merge_dots_with_list throws an error with unnamed arguments and allow_unnamed_elements = FALSE",
merge_dots_with_list(x = 1, "b", l = list(y = "c")),
"There are unnamed elements in x or y, but allow_unnamed_elements = FALSE"
"merge_dots_with_list works with unnamed arguments and allow_unnamed_elements = TRUE",
"merge_dots_with_list works with no list argument",
actual <- merge_dots_with_list(x = 1, y = "b")