- data = getDataTest(150, FALSE)
-
- # index 142 : serie type 2
- f = computeFilaments(data, 142, limit=60, plot=FALSE)
- # Expected output: 22 series of type 3 (closer), then 50-2-10 series of type 2
- expect_identical(length(f$indices), 60)
- expect_identical(length(f$colors), 60)
- for (i in 1:22)
- {
- expect_identical((f$indices[i] %% 3) + 1, 3)
- expect_match(f2$colors[i], f$colors[1])
- }
- for (i in 23:60)
- {
- expect_identical((f$indices[i] %% 3) + 1, 2)
- expect_match(f2$colors[i], f$colors[23])
- }
- expect_match(colors[1], "...")
- expect_match(colors[23], "...")
-})