File: test-s4.Rout.save

package info (click to toggle)
r-cran-diffobj 0.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,432 kB
  • sloc: ansic: 455; javascript: 96; sh: 32; makefile: 8
file content (62 lines) | stat: -rwxr-xr-x 2,165 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> NAME <- "s4"
> source(file.path('_helper', 'init.R'))
> 
> # - diff data validation works
> #
> # These are not currently in use
> # expect_match(diffobj:::valid_dat("hello"), "should be a list")
> # D0 <- D1 <- D2 <- D3 <- D4 <- D5 <- D6 <- D7 <-
> #   diffPrint(letters, LETTERS)@tar.dat
> 
> # expect_match(diffobj:::valid_dat(unname(D0)), "should have names")
> 
> # length(D1[[1L]]) <- 1L
> # expect_match(diffobj:::valid_dat(D1), "should have equal length")
> 
> # D2$orig <- integer(length(D2$orig))
> # expect_match(diffobj:::valid_dat(D2), "should be character")
> 
> # D3$trim.ind.start <- character(length(D3$trim.ind.start))
> # expect_match(diffobj:::valid_dat(D3), "should be integer")
> 
> # D4$word.ind <- integer(length(D4$word.ind))
> # expect_match(diffobj:::valid_dat(D4), "should be list")
> 
> # D5$word.ind <- vector("list", length(D5$word.ind))
> # expect_match(diffobj:::valid_dat(D5), "not in expected format")
> 
> # D6$tok.rat <- D6$tok.rat + 2
> # expect_match(diffobj:::valid_dat(D6), "with all values between")
> 
> # D7$fill <- integer(length(D7$fill))
> # expect_match(diffobj:::valid_dat(D7), "should be logical")
> 
> # - any ------------------------------------------------------------------------
> 
> isTRUE(any(diffChr('a', 'b')))
[1] TRUE
> identical(any(diffChr('a', 'a')), FALSE)
[1] TRUE
> try(any(diffChr('a', 'a'), 2)) # "supports only one argument"
Error : `any` method for `Diff` supports only one argument
> 
> proc.time()
   user  system elapsed 
  1.302   0.151   1.474