Browse code

Adding unit test for new option

wkumler authored on 29/06/2021 21:56:20
Showing1 changed files

... ...
@@ -51,4 +51,13 @@ if (all(abs(normalize.quantiles.use.target(y,y.norm.target.truth) - y.norm.truth
51 51
 }
52 52
 
53 53
 
54
-
54
+x <- matrix(c(100,15,200,250,110,16.5,220,275,120,18,240,300),ncol=3)
55
+rownames(x) <- letters[1:4]
56
+colnames(x) <- LETTERS[1:3]
57
+y <- normalize.quantiles(x, keep.names = TRUE)
58
+if(!all(colnames(x)==colnames(y))){
59
+    stop("Disagreement between initial and final column names despite keep.names=TRUE")
60
+}
61
+if(!all(rownames(x)==rownames(y))){
62
+    stop("Disagreement between initial and final row names despite keep.names=TRUE")
63
+}