Running ‘test-all.R’ [7s/5s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library(testthat)
  > test_check("diffrprojects")
  Loading required package: diffrprojects
  Loading required package: stringb
  Loading required package: rtext
  1. Error: diffrproject text_align works (@test_dp_align.r#10) ------------------
  a character vector argument expected
  1: expect_true({
         dp <- diffrproject$new()
         dp$text_add(text = "a\nb")
         dp$text_add(text = "")
         dp$text_add(text = "b\n")
         dp$text_link()
         names(dp$text)
         dp$text_align()
         length(dp$alignment) == 2 & all(dim(as.data.frame(dp$alignment)) == c(3, 10))
     }) at testthat/test_dp_align.r:10
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: dp$text_add(text = "a\nb") at testthat/test_dp_align.r:12
  7: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  2. Error: diffrproject alignment_delete works (@test_dp_align.r#77) ------------
  a character vector argument expected
  1: expect_true({
         dp <- diffrproject$new()
         dp$text_add("")
         dp$text_add("b\n")
         dp$text_link()
         dp$text_align()
         dp$alignment
         dp$alignment_delete(1, 1)
         dim(dp$alignment[[1]])[1] == 0
     }) at testthat/test_dp_align.r:77
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: dp$text_add("") at testthat/test_dp_align.r:79
  7: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  3. Error: diffrproject alignment_data_set() (@test_dp_align.r#147) -------------
  a character vector argument expected
  1: expect_true({
         dp <- diffrproject$new()$text_add(list("abcd", "bcdaa", "ccdabbcd"))$text_link()$debug()$text_align(tokenizer = function(x) {
             text_tokenize(x, "")
         })
         dp$alignment_data_set(link = 1, alignment_i = 1, x = "test_var", val = 3)
         dp$alignment_data_set(link = 1, alignment_i = 1:4, x = "y", val = 2)
         dp$alignment_data_set(link = 2, alignment_i = 1:9, x = "y", val = 2)
         df <- as.data.frame(dp$alignment_data)
         all(c("alignment_i", "hl", "link") %in% names(df))
     }) at testthat/test_dp_align.r:147
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: diffrproject$new()$text_add(list("abcd", "bcdaa", "ccdabbcd")) at testthat/test_dp_align.r:148
  7: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  4. Error: diffrproject alignment_data_code() (@test_dp_align.r#221) ------------
  a character vector argument expected
  1: expect_true({
         dp <- diffrproject$new()$text_add(list("abcd", "bcdaa", "ccdabbcd"))$text_link()$debug()$text_align(tokenizer = function(x) {
             text_tokenize(x, "")
         })
         dp$alignment_code(link = 1, alignment_i = 1, x = "test_var", val = 3)
         dp$alignment_code(link = 1, alignment_i = 1:4, x = "y", val = 2)
         dp$alignment_code(link = 2, alignment_i = 1:9, x = "y", val = 2)
         df <- as.data.frame(dp$alignment_data)
         all(c("alignment_i", "hl", "link") %in% names(df))
     }) at testthat/test_dp_align.r:221
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: diffrproject$new()$text_add(list("abcd", "bcdaa", "ccdabbcd")) at testthat/test_dp_align.r:222
  7: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  5. Failure: text can be added (@test_dp_base.r#21) -----------------------------
  {
      ...
  } threw an error.
  a character vector argument expected
  
  
  6. Failure: text can be added (@test_dp_base.r#25) -----------------------------
  {
      ...
  } threw an error.
  a character vector argument expected
  
  
  7. Error: text can be added (@test_dp_base.r#46) -------------------------------
  a character vector argument expected
  1: expect_true({
         dp <- diffrproject$new()
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(text = "")
         dp$text_add(text = "")
         length(dp$text) == 4
     }) at testthat/test_dp_base.r:46
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: dp$text_add(rtext = rtext::rtext$new("")) at testthat/test_dp_base.r:48
  7: text_add_worker(self, rtext, name = name)
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  8. Error: names and ids are unique (@test_dp_base.r#70) ------------------------
  a character vector argument expected
  1: expect_true({
         dp <- diffrproject$new()
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""), name = "a")
         dp$text_add(rtext = rtext::rtext$new(""), name = "b")
         dp$text_add(rtext = rtext::rtext$new(""), name = "c")
         dp$text_add(rtext = rtext::rtext$new(""), name = "a")
         all(names(dp$text) == unique(names(dp$text)))
     }) at testthat/test_dp_base.r:70
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: dp$text_add(rtext = rtext::rtext$new("")) at testthat/test_dp_base.r:72
  7: text_add_worker(self, rtext, name = name)
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  9. Error: text can be deleted (@test_dp_base.r#116) ----------------------------
  a character vector argument expected
  1: expect_true({
         dp <- diffrproject$new()
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""))
         dp$text_add(rtext = rtext::rtext$new(""), name = "a")
         dp$text_add(rtext = rtext::rtext$new(""), name = "b")
         dp$text_add(rtext = rtext::rtext$new(""), name = "c")
         dp$text_add(rtext = rtext::rtext$new(""), name = "a")
         dp$text_delete()
         dp$text_delete()
         dp$text_delete()
         dp$text_delete()
         dp$text_delete()
         dp$text_delete()
         dp$text_delete()
         length(dp$text) == 0
     }) at testthat/test_dp_base.r:116
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: dp$text_add(rtext = rtext::rtext$new("")) at testthat/test_dp_base.r:118
  7: text_add_worker(self, rtext, name = name)
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  10. Error: imported equals exported (@test_dp_export.r#6) ----------------------
  a character vector argument expected
  1: diffrproject$new()$text_add(list("aaa\nbb\ncccc\ndd\nee\nff\ny\n", "bb\ncccd\ndd\nddd\nee\nff\n")) at testthat/test_dp_export.r:6
  2: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  3: stringb::text_extract(names, "\\d+")
  4: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  5: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  11. Error: loaded equals saved (@test_dp_loadsave.r#6) -------------------------
  a character vector argument expected
  1: diffrproject$new()$text_add(list("aaa\nbb\ncccc\ndd\nee\nff\ny\n", "bb\ncccd\ndd\nddd\nee\nff\n")) at testthat/test_dp_loadsave.r:6
  2: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  3: stringb::text_extract(names, "\\d+")
  4: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  5: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  12. Error: dp_text_base_data works properly (@test_tools.r#28) -----------------
  a character vector argument expected
  1: expect_true({
         dp$text_add(text = "abcd")
         dim(dp_text_base_data(dp))[1] == 1
     }, NA) at testthat/test_tools.r:28
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: dp$text_add(text = "abcd") at testthat/test_tools.r:29
  7: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  8: stringb::text_extract(names, "\\d+")
  9: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  10: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  13. Error: as.data.frame methods work (@test_tools.r#43) -----------------------
  a character vector argument expected
  1: dp$text_add(text = "a\nb") at testthat/test_tools.r:43
  2: text_add_worker(self, rtext = rtext::rtext$new(text = text[[i]], ..., verbos = self$options$verbose), 
         name = name[i])
  3: stringb::text_extract(names, "\\d+")
  4: regmatches(x, regexpr(pattern = pattern, text = x, ignore.case = ignore.case, perl = perl, 
         fixed = fixed, useBytes = useBytes), invert = invert)
  5: `Encoding<-`(`*tmp*`, value = itype <- "bytes")
  
  testthat results ================================================================
  OK: 87 SKIPPED: 0 FAILED: 13
  1. Error: diffrproject text_align works (@test_dp_align.r#10) 
  2. Error: diffrproject alignment_delete works (@test_dp_align.r#77) 
  3. Error: diffrproject alignment_data_set() (@test_dp_align.r#147) 
  4. Error: diffrproject alignment_data_code() (@test_dp_align.r#221) 
  5. Failure: text can be added (@test_dp_base.r#21) 
  6. Failure: text can be added (@test_dp_base.r#25) 
  7. Error: text can be added (@test_dp_base.r#46) 
  8. Error: names and ids are unique (@test_dp_base.r#70) 
  9. Error: text can be deleted (@test_dp_base.r#116) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted