@@ -103,7 +103,21 @@ Rectangle {
104 function test_threshold(data) {
104 function test_threshold(data) {
105 tool.style = testCase.styles[data.index];
105 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.");
109+ function test_inverse_data() {
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 },
118+ function test_inverse(data) {
119+ tool.style = testCase.styles[data.index];
120+ compare(tool.inverse, data.inverse, "Inversion was incorrect.");