Skip to content

Commit a694ed2

Browse files
committed
Add #nocov to two spots coverage cannot reach
1 parent f701ff3 commit a694ed2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/Attributes.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ sourceCpp <- function(file = "",
6262

6363
# validate that there are no spaces in the path on windows
6464
if (.Platform$OS.type == "windows") {
65-
if (grepl(' ', basename(file), fixed=TRUE)) {
65+
if (grepl(' ', basename(file), fixed=TRUE)) { # #nocov start
6666
stop("The filename '", basename(file), "' contains spaces. This ",
67-
"is not permitted.")
67+
"is not permitted.") # #nocov end
6868
}
6969
} else {
7070
if (windowsDebugDLL) {
@@ -73,7 +73,7 @@ sourceCpp <- function(file = "",
7373
"non-Windows platforms.")
7474
}
7575
windowsDebugDLL <- FALSE # now we do not need to deal with OS choice below
76-
}
76+
}
7777
}
7878

7979
# get the context (does code generation as necessary)
@@ -325,7 +325,7 @@ cppFunction <- function(code,
325325
if (length(exported$functions) == 0)
326326
stop("No function definition found")
327327
else if (length(exported$functions) > 1)
328-
stop("More than one function definition")
328+
stop("More than one function definition") # #nocov
329329
else {
330330
functionName <- exported$functions[[1]]
331331
invisible(get(functionName, env))

0 commit comments

Comments
 (0)