# Copyright (C) 2023 Brodie Gaslam
#
# This file is part of "vetr - Trust, but Verify"
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# Go to <https://www.r-project.org/Licenses/GPL-2> for a copy of the license.

abstract(array(1:8, c(2, 2, 2), dimnames = list(letters[1:2], 
    LETTERS[1:2], NULL)))

list.arr <- replicate(8, list(1), simplify = FALSE)

Warning: stack imbalance in 'withVisible', 88 then 102

`iris[1:10, 1:3]` should have 5 columns (has 3)

[1] "`iris[1:10, 1:3]` should have 5 columns (has 3)"

Warning: stack imbalance in 'withVisible', 88 then 92

alike(abstract(iris), transform(iris, Species = as.character(Species)))

`transform(iris, Species = as.character(Species))$Species` should be class "factor" (is "character")

[1] "`transform(iris, Species = as.character(Species))$Species` should be class \"factor\" (is \"character\")"

Warning: stack imbalance in 'withVisible', 88 then 100

y <- ts(runif(12), start = 1970, frequency = 12)

y2 <- ts(numeric(12), start = 1960, frequency = 12)

y2 <- ts(numeric(12), start = 1960, frequency = 13)

Argument `what` must be character with all values in c("start", "end", "frequency")

Error in abstract.ts(y, "boom") : 
  Argument `what` must be character with all values in c("start", "end", "frequency")

Argument `x` must have a "tsp" attribute that is numeric(3L)

Error in vetr:::abstract.ts(1:12) : 
  Argument `x` must have a "tsp" attribute that is numeric(3L)

# Test what happens with both "tsp" and "tsp_vetr"

[1] "`length(y.abs)` should be 12 (is 0)"

[1] "`y.abs` should have attribute \"tsp\""

An object of class "unitizerGlobalState"
Slot "search.path":
NULL

Slot "options":
NULL

Slot "working.directory":
NULL

Slot "random.seed":
NULL

Slot "namespaces":
NULL