Running ‘testthat.R’ [14s/67s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(fixedincome)
  > 
  > test_check("fixedincome")
  [ FAIL 24 | WARN 0 | SKIP 0 | PASS 283 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-spotratecurve.R:99'): it should index the elements ───────────
  as.numeric(curve[[11]]) (`actual`) not equal to 0.056 (`expected`).
  
    `actual`: NA
  `expected`:  0
  ── Failure ('test-spotratecurve.R:102'): it should index the elements ──────────
  as.numeric(curve[[c(1, 11)]]) (`actual`) not equal to c(0.0719, 0.056) (`expected`).
  
    `actual`: NA NA
  `expected`:  0  0
  ── Failure ('test-spotratecurve.R:111'): it should return a NA spotrate for unexistent indexes ──
  as.numeric(curve[[c(10, 11)]]) (`actual`) not equal to c(NA, 0.056) (`expected`).
  
    `actual`: NA NA
  `expected`: NA  0
  ── Failure ('test-spotratecurve.R:120'): it should replace or insert elements into the curve ──
  as.numeric(curve[[10]]) (`actual`) not equal to 0.051 (`expected`).
  
    `actual`: NA
  `expected`:  0
  ── Failure ('test-spotratecurve.R:122'): it should replace or insert elements into the curve ──
  match(10, curve@terms) (`actual`) not equal to 2 (`expected`).
  
    `actual`: NA
  `expected`:  2
  ── Failure ('test-spotratecurve.R:125'): it should replace or insert elements into the curve ──
  as.numeric(curve[[c(8, 9)]]) (`actual`) not equal to c(0.048, 0.049) (`expected`).
  
    `actual`: NA NA
  `expected`:  0  0
  ── Failure ('test-spotratecurve.R:126'): it should replace or insert elements into the curve ──
  match(c(8, 9), curve@terms) (`actual`) not equal to c(2, 3) (`expected`).
  
    `actual`: NA NA
  `expected`:  2  3
  ── Failure ('test-spotratecurve.R:129'): it should replace or insert elements into the curve ──
  as.numeric(curve[[c(12, 13)]]) (`actual`) not equal to c(0.049, 0.049) (`expected`).
  
    `actual`: NA NA
  `expected`:  0  0
  ── Failure ('test-spotratecurve.R:133'): it should replace or insert elements into the curve ──
  as.numeric(curve[[11]]) (`actual`) not equal to 0.051 (`expected`).
  
    `actual`: NA
  `expected`:  0
  ── Failure ('test-spotratecurve.R:134'): it should replace or insert elements into the curve ──
  length(curve) (`actual`) not equal to `len_` (`expected`).
  
    `actual`: 11
  `expected`: 10
  ── Failure ('test-spotratecurve.R:138'): it should replace or insert elements into the curve ──
  as.numeric(curve[[c(1, 11)]]) (`actual`) not equal to c(0.051, 0.051) (`expected`).
  
    `actual`: NA NA
  `expected`:  0  0
  ── Failure ('test-spotratecurve.R:139'): it should replace or insert elements into the curve ──
  length(curve) (`actual`) not equal to `len_` (`expected`).
  
    `actual`: 13
  `expected`: 11
  ── Failure ('test-spotratecurve.R:142'): it should replace or insert elements into the curve ──
  as.numeric(curve[[c(1, 11)]]) (`actual`) not equal to c(0.05, 0.05) (`expected`).
  
    `actual`: NA NA
  `expected`:  0  0
  ── Failure ('test-spotratecurve.R:143'): it should replace or insert elements into the curve ──
  length(curve) (`actual`) not equal to `len_` (`expected`).
  
    `actual`: 15
  `expected`: 11
  ── Failure ('test-spotratecurve.R:147'): it should replace or insert elements into the curve ──
  as.numeric(curve[[c(25, 26, 29)]]) (`actual`) not equal to c(0.07, 0.07, 0.07) (`expected`).
  
    `actual`: NA NA NA
  `expected`:  0  0  0
  ── Failure ('test-spotratecurve.R:148'): it should replace or insert elements into the curve ──
  length(curve) (`actual`) not equal to len_ + 2 (`expected`).
  
    `actual`: 18
  `expected`: 17
  ── Failure ('test-spotratecurve.R:151'): it should replace or insert elements into the curve ──
  as.numeric(curve[[c(31, 28, 35)]]) (`actual`) not equal to c(0.072, 0.071, 0.073) (`expected`).
  
    `actual`: NA NA NA
  `expected`:  0  0  0
  ── Failure ('test-spotratecurve.R:158'): it should replace with another spotrate ──
  as.numeric(curve[[13]]) (`actual`) not equal to as.numeric(curve[1]) (`expected`).
  
    `actual`: NA
  `expected`:  0
  ── Failure ('test-spotratecurve.R:179'): it should insert a spotratecurve into another spotratecurve ──
  as.numeric(curve[[c(1, 3)]]) (`actual`) not equal to c(0.05, 0.5) (`expected`).
  
    `actual`: NA NA
  `expected`:  0  0
  ── Error ('test-spotratecurve.R:237'): it should remove a term from spotrate curve by using negative index ──
  Error in `validObject(.Object)`: invalid class "SpotRateCurve" object: FALSE
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-spotratecurve.R:237:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─curve[[-11]]
    5. └─curve[[-11]]
    6.   ├─fixedincome::spotratecurve(...)
    7.   └─fixedincome:::spotratecurve.numeric(...)
    8.     └─methods::new(...)
    9.       ├─methods::initialize(value, ...)
   10.       └─methods::initialize(value, ...)
   11.         └─methods::validObject(.Object)
  ── Failure ('test-spotratecurve.R:244'): it should index spotratecurve by position ──
  curve[[11]] (`actual`) not equal to curve[2] (`expected`).
  
    `actual@.Data`: NA
  `expected@.Data`:  0
  
    `actual`: NA
  `expected`:  0
  ── Error ('test-spotratecurve.R:249'): it should remove a spotratecurve element by its strict position ──
  Error in `validObject(.Object)`: invalid class "SpotRateCurve" object: FALSE
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(curve[[-11]], curve[-2]) at test-spotratecurve.R:249:2
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─curve[[-11]]
    5. └─curve[[-11]]
    6.   ├─fixedincome::spotratecurve(...)
    7.   └─fixedincome:::spotratecurve.numeric(...)
    8.     └─methods::new(...)
    9.       ├─methods::initialize(value, ...)
   10.       └─methods::initialize(value, ...)
   11.         └─methods::validObject(.Object)
  ── Failure ('test-spotratecurve.R:256'): it should replace spotratecurve elements using its strict position ──
  as.numeric(curve[[11]]) (`actual`) not equal to 0.051 (`expected`).
  
    `actual`: NA
  `expected`:  0
  ── Failure ('test-spotratecurve.R:260'): it should replace spotratecurve elements using its strict position ──
  as.numeric(curve[[c(11, 26)]]) (`actual`) not equal to c(0.051, 0.052) (`expected`).
  
    `actual`: NA NA
  `expected`:  0  0
  
  [ FAIL 24 | WARN 0 | SKIP 0 | PASS 283 ]
  Error: Test failures
  Execution halted