@@ -103,7 +103,21 @@ Rectangle {
103103
104104 function test_threshold(data) {
105105 tool.style = testCase.styles[data.index];
106− compare(tool.threshold.toFixed(4), data.threshold.toFixed(4), "Luminance threshold was incorrect.")
106+ compare(tool.threshold.toFixed(4), data.threshold.toFixed(4), "Luminance threshold was incorrect.");
107+ }
108+
109+ function test_inverse_data() {
110+ return [
111+ { tag: "default", index: 0, inverse: false },
112+ { tag: "red on black", index: 1, inverse: false },
113+ { tag: "green on white", index: 2, inverse: true },
114+ { tag: "blue on darkgrey", index: 3, inverse: true },
115+ ];
116+ }
117+
118+ function test_inverse(data) {
119+ tool.style = testCase.styles[data.index];
120+ compare(tool.inverse, data.inverse, "Inversion was incorrect.");
107121 }
108122 }
109123}