length(r_phylo_M3[[i]][[j]]) (`actual`) not equal to n[i] (`expected`).

  `actual`:  0
`expected`: 15

test_that("r_phylo outputs a list with the same size as the inputted number of assemblages, and the correct inputted number of slices", {
# Creating empty lists to store r_phylo outputs
mat[[i]] <- matrix(sample(c(1, 0), 30*15, replace = TRUE), ncol = 30, nrow = 15)
colnames(mat[[i]]) <- tree[[i]]$tip.label # Name its columns according to tip names
adj[[i]] <- matrix(sample(c(1,0), 15*15, replace = TRUE), ncol = 15, nrow = 15)
# Run the algorithm for different phylogentic indexes while suppressing some warnings
# (related to tips no present within the matrix, and vice-versa)
r_phylo_M1[[i]] <- r_phylo(tree[[i]], n = n[i], mat = mat[[i]], index = "PD")
r_phylo_M2[[i]] <- r_phylo(tree[[i]], n = n[i], mat = mat[[i]], index = "PE")
r_phylo_M3[[i]] <- r_phylo(tree[[i]], n = n[i], mat = mat[[i]], adj = adj[[i]], index = "PB")
r_phylo_M4[[i]] <- r_phylo(tree[[i]], n = n[i], mat = mat[[i]], adj = adj[[i]], index = "PB_RW")

"r_phylo outputs a list with the same size as the inputted number of assemblages, and the correct inputted number of slices"
# Name its columns according to tip names

r_phylo outputs a list with the same size as the inputted number of assemblages, and the correct inputted number of slices

length(r_phylo_M4[[i]][[j]]) (`actual`) not equal to n[i] (`expected`).

  `actual`:  1
`expected`: 15