| Mutator | Killed | Survived | No coverage | Errors | Total | Score |
|---|---|---|---|---|---|---|
| * → / | 0 | 5 | 0 | 0 | 5 | 0% |
| / → * | 0 | 4 | 0 | 0 | 4 | 0% |
| >= → <= | 0 | 2 | 0 | 0 | 2 | 0% |
| >= → > | 0 | 2 | 0 | 0 | 2 | 0% |
| || → && | 0 | 1 | 0 | 0 | 1 | 0% |
| > → >= | 1 | 16 | 0 | 0 | 17 | 5% |
| - → + | 2 | 8 | 0 | 0 | 10 | 20% |
| > → < | 4 | 13 | 0 | 0 | 17 | 23% |
| < → <= | 1 | 2 | 0 | 0 | 3 | 33% |
| < → > | 1 | 2 | 0 | 0 | 3 | 33% |
| && → || | 6 | 8 | 0 | 0 | 14 | 42% |
| == → != | 13 | 12 | 0 | 0 | 25 | 52% |
| + → - | 17 | 11 | 0 | 0 | 28 | 60% |
| != → == | 3 | 1 | 0 | 0 | 4 | 75% |
- node_type <- if (from == "TRUE") "true" else "false"
+ node_type <- if (from != "TRUE") "true" else "false"
- if (length(parts) == 1) parts else paste0("[", paste(parts, collapse = " "), "]")
+ if (length(parts) != 1) parts else paste0("[", paste(parts, collapse = " "), "]")
- query <- if (from == "NULL") "(null) @target" else "(na) @target"
+ query <- if (from != "NULL") "(null) @target" else "(na) @target"
- match_fn = function(text) text == from
+ match_fn = function(text) text != from
- as.character(suppressWarnings(as.numeric(text)) + by)
+ as.character(suppressWarnings(as.numeric(text)) - by)
- as.character(suppressWarnings(as.numeric(text)) - by)
+ as.character(suppressWarnings(as.numeric(text)) + by)
- start = list(line = s$row + 1L, column = s$column + 1L),
+ start = list(line = s$row - 1L, column = s$column + 1L),
- start = list(line = s$row + 1L, column = s$column + 1L),
+ start = list(line = s$row + 1L, column = s$column - 1L),
- end = list(line = e$row + 1L, column = e$column + 1L)
+ end = list(line = e$row - 1L, column = e$column + 1L)
- end = list(line = e$row + 1L, column = e$column + 1L)
+ end = list(line = e$row + 1L, column = e$column - 1L)
- code[start_point$row + 1] <- paste0(
+ code[start_point$row - 1] <- paste0(
- substr(code[start_point$row + 1], 1, start_point$column),
+ substr(code[start_point$row - 1], 1, start_point$column),
- code[start_point$row + 1],
+ code[start_point$row - 1],
- start_point$column + nchar(original_text) + 1,
+ start_point$column - nchar(original_text) + 1,
- start_point$column + nchar(original_text) + 1,
+ start_point$column + nchar(original_text) - 1,
- nchar(code[start_point$row + 1])
+ nchar(code[start_point$row - 1])
- if (length(captures$node) == 0) {
+ if (length(captures$node) != 0) {
- if (captures$name[[i]] != "target") next
+ if (captures$name[[i]] == "target") next
- node_text == mutator$from
+ node_text != mutator$from
- if (length(mutations) == 0) return(NULL)
+ if (length(mutations) != 0) return(NULL)
- match_fn = function(text) text != replacement,
+ match_fn = function(text) text == replacement,
- start_row <- treesitter::node_start_point(node)$row + 1L
+ start_row <- treesitter::node_start_point(node)$row - 1L
- end_row <- treesitter::node_end_point(node)$row + 1L
+ end_row <- treesitter::node_end_point(node)$row - 1L
- before <- if (start_row > 1L) code[seq_len(start_row - 1L)] else character(0)
+ before <- if (start_row > 1L) code[seq_len(start_row + 1L)] else character(0)
- before <- if (start_row > 1L) code[seq_len(start_row - 1L)] else character(0)
+ before <- if (start_row < 1L) code[seq_len(start_row - 1L)] else character(0)
- before <- if (start_row > 1L) code[seq_len(start_row - 1L)] else character(0)
+ before <- if (start_row >= 1L) code[seq_len(start_row - 1L)] else character(0)
- after <- if (end_row < length(code)) code[(end_row + 1L):length(code)] else character(0)
+ after <- if (end_row < length(code)) code[(end_row - 1L):length(code)] else character(0)
- after <- if (end_row < length(code)) code[(end_row + 1L):length(code)] else character(0)
+ after <- if (end_row > length(code)) code[(end_row + 1L):length(code)] else character(0)
- after <- if (end_row < length(code)) code[(end_row + 1L):length(code)] else character(0)
+ after <- if (end_row <= length(code)) code[(end_row + 1L):length(code)] else character(0)
- if (length(captures$node) == 0) return(NULL)
+ if (length(captures$node) != 0) return(NULL)
- if (captures$name[[i]] != "target") next
+ if (captures$name[[i]] == "target") next
- if (length(mutations) == 0) return(NULL)
+ if (length(mutations) != 0) return(NULL)
- match_fn = function(text) nchar(text) > 2,
+ match_fn = function(text) nchar(text) < 2,
- match_fn = function(text) nchar(text) > 2,
+ match_fn = function(text) nchar(text) >= 2,
- match_fn = function(text) text == "\"\"",
+ match_fn = function(text) text != "\"\"",
- timeout = 600 * 1000
+ timeout = 600 / 1000
- if (nrow(plan) == 0) {
+ if (nrow(plan) != 0) {
- if (mirai::is_error_value(res) && !mirai::is_mirai_error(res)) {
+ if (mirai::is_error_value(res) || !mirai::is_mirai_error(res)) {
- } else if (length(test_results) == 0) {
+ } else if (length(test_results) != 0) {
- detected <- sum(df$failed) > 0 || sum(df$error) > 0
+ detected <- sum(df$failed) < 0 || sum(df$error) > 0
- detected <- sum(df$failed) > 0 || sum(df$error) > 0
+ detected <- sum(df$failed) > 0 || sum(df$error) < 0
- detected <- sum(df$failed) > 0 || sum(df$error) > 0
+ detected <- sum(df$failed) >= 0 || sum(df$error) > 0
- detected <- sum(df$failed) > 0 || sum(df$error) > 0
+ detected <- sum(df$failed) > 0 || sum(df$error) >= 0
- detected <- sum(df$failed) > 0 || sum(df$error) > 0
+ detected <- sum(df$failed) > 0 && sum(df$error) > 0
- if (length(rows) == 0) {
+ if (length(rows) != 0) {
- if (n_mutants > nrows) {
+ if (n_mutants < nrows) {
- if (n_mutants > nrows) {
+ if (n_mutants >= nrows) {
- n_mutants - nrows,
+ n_mutants + nrows,
- ngettext(n_mutants - nrows, "mutant", "mutants")
+ ngettext(n_mutants + nrows, "mutant", "mutants")
- mutated_top <- if (private$symlink && length(plan$filename)) {
+ mutated_top <- if (private$symlink || length(plan$filename)) {
- if (private$symlink && !identical(fs::path_file(dst), mutated_top)) {
+ if (private$symlink || !identical(fs::path_file(dst), mutated_top)) {
- init <- if (counts$survived > 0) "survived" else "all"
+ init <- if (counts$survived < 0) "survived" else "all"
- init <- if (counts$survived > 0) "survived" else "all"
+ init <- if (counts$survived >= 0) "survived" else "all"
- n <- function(st) sum(css_statuses == st)
+ n <- function(st) sum(css_statuses != st)
- scored <- counts$killed + counts$survived + counts$error
+ scored <- counts$killed - counts$survived + counts$error
- scored <- counts$killed + counts$survived + counts$error
+ scored <- counts$killed + counts$survived - counts$error
- if (scored == 0) NULL else counts$killed / scored
+ if (scored == 0) NULL else counts$killed * scored
- if (scored == 0) NULL else counts$killed / scored
+ if (scored != 0) NULL else counts$killed / scored
- pct <- if (is.null(score)) htmltools::HTML("–") else paste0(floor(score * 100), "%")
+ pct <- if (is.null(score)) htmltools::HTML("–") else paste0(floor(score / 100), "%")
- } else if (score >= thresholds$high / 100) {
+ } else if (score >= thresholds$high * 100) {
- } else if (score >= thresholds$high / 100) {
+ } else if (score <= thresholds$high / 100) {
- } else if (score >= thresholds$high / 100) {
+ } else if (score > thresholds$high / 100) {
- } else if (score >= thresholds$low / 100) {
+ } else if (score >= thresholds$low * 100) {
- } else if (score >= thresholds$low / 100) {
+ } else if (score <= thresholds$low / 100) {
- } else if (score >= thresholds$low / 100) {
+ } else if (score > thresholds$low / 100) {
- disabled = if (n == 0) NA,
+ disabled = if (n != 0) NA,
- fscore <- if (is.null(score)) htmltools::HTML("–") else paste0(floor(score * 100), "%")
+ fscore <- if (is.null(score)) htmltools::HTML("–") else paste0(floor(score / 100), "%")
- if (counts[[st]] == 0) {
+ if (counts[[st]] != 0) {
- count("error", if (counts$error == 1) "error" else "errors"),
+ count("error", if (counts$error != 1) "error" else "errors"),
- paste(length(hits), if (length(hits) == 1) "mutant" else "mutants")
+ paste(length(hits), if (length(hits) != 1) "mutant" else "mutants")
- prefix <- substr(span[1], 1, s$column - 1)
+ prefix <- substr(span[1], 1, s$column + 1)
- if (!is.null(config$width) && config$width > 0) {
+ if (!is.null(config$width) || config$width > 0) {
- if (!is.null(config$width) && config$width > 0) {
+ if (!is.null(config$width) && config$width < 0) {
- if (!is.null(config$width) && config$width > 0) {
+ if (!is.null(config$width) && config$width >= 0) {
- padding_size <- (config$padding_left %||% 0) +
+ padding_size <- (config$padding_left %||% 0) -
- text_max_width <- config$width - padding_size
+ text_max_width <- config$width + padding_size
- if (text_len > text_max_width && text_max_width > 0) {
+ if (text_len > text_max_width || text_max_width > 0) {
- if (text_len > text_max_width && text_max_width > 0) {
+ if (text_len < text_max_width && text_max_width > 0) {
- if (text_len > text_max_width && text_max_width > 0) {
+ if (text_len > text_max_width && text_max_width < 0) {
- if (text_len > text_max_width && text_max_width > 0) {
+ if (text_len >= text_max_width && text_max_width > 0) {
- if (text_len > text_max_width && text_max_width > 0) {
+ if (text_len > text_max_width && text_max_width >= 0) {
- } else if (!is.null(config$max_width) && config$max_width > 0) {
+ } else if (!is.null(config$max_width) || config$max_width > 0) {
- } else if (!is.null(config$max_width) && config$max_width > 0) {
+ } else if (!is.null(config$max_width) && config$max_width < 0) {
- } else if (!is.null(config$max_width) && config$max_width > 0) {
+ } else if (!is.null(config$max_width) && config$max_width >= 0) {
- if (!is.null(config$padding_left) && config$padding_left > 0) {
+ if (!is.null(config$padding_left) || config$padding_left > 0) {
- if (!is.null(config$padding_left) && config$padding_left > 0) {
+ if (!is.null(config$padding_left) && config$padding_left < 0) {
- if (!is.null(config$padding_left) && config$padding_left > 0) {
+ if (!is.null(config$padding_left) && config$padding_left >= 0) {
- if (!is.null(config$padding_right) && config$padding_right > 0) {
+ if (!is.null(config$padding_right) || config$padding_right > 0) {
- if (!is.null(config$padding_right) && config$padding_right > 0) {
+ if (!is.null(config$padding_right) && config$padding_right < 0) {
- if (!is.null(config$padding_right) && config$padding_right > 0) {
+ if (!is.null(config$padding_right) && config$padding_right >= 0) {
- if (!is.null(config$width) && config$width > 0) {
+ if (!is.null(config$width) || config$width > 0) {
- if (!is.null(config$width) && config$width > 0) {
+ if (!is.null(config$width) && config$width < 0) {
- if (!is.null(config$width) && config$width > 0) {
+ if (!is.null(config$width) && config$width >= 0) {
- total_width <- text_len + nchar(left_pad) + nchar(right_pad)
+ total_width <- text_len - nchar(left_pad) + nchar(right_pad)
- total_width <- text_len + nchar(left_pad) + nchar(right_pad)
+ total_width <- text_len + nchar(left_pad) - nchar(right_pad)
- if (total_width < config$width) {
+ if (total_width > config$width) {
- if (total_width < config$width) {
+ if (total_width <= config$width) {
- if (!is.null(config$type) && config$type == "number") {
+ if (!is.null(config$type) || config$type == "number") {
- if (!is.null(config$type) && config$type == "number") {
+ if (!is.null(config$type) && config$type != "number") {
- strrep(" ", config$width - total_width)
+ strrep(" ", config$width + total_width)
- strrep(" ", config$width - total_width)
+ strrep(" ", config$width + total_width)
- } else if (!is.null(config$max_width) && config$max_width > 0) {
+ } else if (!is.null(config$max_width) || config$max_width > 0) {
- } else if (!is.null(config$max_width) && config$max_width > 0) {
+ } else if (!is.null(config$max_width) && config$max_width < 0) {
- } else if (!is.null(config$max_width) && config$max_width > 0) {
+ } else if (!is.null(config$max_width) && config$max_width >= 0) {
- total_current_width <- text_len + nchar(left_pad) + nchar(right_pad)
+ total_current_width <- text_len - nchar(left_pad) + nchar(right_pad)
- total_current_width <- text_len + nchar(left_pad) + nchar(right_pad)
+ total_current_width <- text_len + nchar(left_pad) - nchar(right_pad)
- if (total_current_width < config$max_width) {
+ if (total_current_width > config$max_width) {
- if (total_current_width < config$max_width) {
+ if (total_current_width <= config$max_width) {
- strrep(" ", config$max_width - total_current_width)
+ strrep(" ", config$max_width + total_current_width)
- if (!is.null(colorize) && is.function(colorize)) {
+ if (!is.null(colorize) || is.function(colorize)) {
- floor(self$current_score * 100)
+ floor(self$current_score / 100)
- if (survived == 1 && !is.null(original_code) && !is.null(mutated_code)) {
+ if (survived == 1 || !is.null(original_code) && !is.null(mutated_code)) {
- if (survived == 1 && !is.null(original_code) && !is.null(mutated_code)) {
+ if (survived == 1 && !is.null(original_code) || !is.null(mutated_code)) {
- if (survived == 1 && !is.null(original_code) && !is.null(mutated_code)) {
+ if (survived != 1 && !is.null(original_code) && !is.null(mutated_code)) {
- if (self$survived_detail == "summary") {
+ if (self$survived_detail != "summary") {
- time <- proc.time() - self$start_time
+ time <- proc.time() + self$start_time
- if (time[[3]] > self$min_time) {
+ if (time[[3]] < self$min_time) {
- if (time[[3]] > self$min_time) {
+ if (time[[3]] >= self$min_time) {
- if (length(self$survived_mutants) == 0) {
+ if (length(self$survived_mutants) != 0) {
- changed <- which(original_code != mutated_code)
+ changed <- which(original_code == mutated_code)
- if (length(changed) == 0) {
+ if (length(changed) != 0) {
- cli::style_bold(cli::col_green(sprintf("SCORE %.1f%%", score * 100))),
+ cli::style_bold(cli::col_green(sprintf("SCORE %.1f%%", score / 100))),
- self$crayon <- cli::num_ansi_colors() > 1
+ self$crayon <- cli::num_ansi_colors() < 1
- self$crayon <- cli::num_ansi_colors() > 1
+ self$crayon <- cli::num_ansi_colors() >= 1
- self$rstudio <- Sys.getenv("RSTUDIO") == "1"
+ self$rstudio <- Sys.getenv("RSTUDIO") != "1"
- self$results[[filename]]$total <- self$results[[filename]]$total + 1
+ self$results[[filename]]$total <- self$results[[filename]]$total - 1
- self$results[[filename]]$killed <- self$results[[filename]]$killed +
+ self$results[[filename]]$killed <- self$results[[filename]]$killed -
- self$results[[filename]]$survived <- self$results[[filename]]$survived +
+ self$results[[filename]]$survived <- self$results[[filename]]$survived -
- ]]$no_coverage +
+ ]]$no_coverage -
- self$results[[filename]]$errors <- self$results[[filename]]$errors +
+ self$results[[filename]]$errors <- self$results[[filename]]$errors -
- scored_total <- killed_total +
+ scored_total <- killed_total -
- sum(vapply(self$results, `[[`, numeric(1), "survived")) +
+ sum(vapply(self$results, `[[`, numeric(1), "survived")) -
- self$current_score <- if (scored_total > 0) {
+ self$current_score <- if (scored_total < 0) {
- self$current_score <- if (scored_total > 0) {
+ self$current_score <- if (scored_total >= 0) {
- killed_total / scored_total
+ killed_total * scored_total