@@ -106,18 +106,35 @@ Rectangle {
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() {
109+ function test_light_data() {
111− { tag: "default", index: 0, inverse: false },
111+ { tag: "default", index: 0, light: "white" },
112− { tag: "red on black", index: 1, inverse: false },
112+ { tag: "red on black", index: 1, light: "red" },
113− { tag: "green on white", index: 2, inverse: true },
113+ { tag: "green on white", index: 2, light: "white" },
114− { tag: "blue on darkgrey", index: 3, inverse: true },
114+ { tag: "blue on darkgrey", index: 3, light: "darkgrey" },
118− function test_inverse(data) {
118+ function test_light(data) {
119 tool.style = testCase.styles[data.index];
119 tool.style = testCase.styles[data.index];
120− compare(tool.inverse, data.inverse, "Inversion was incorrect.");
120+ verify(Qt.colorEqual(tool.light, data.light),
121+ "Light color not equal: %1 != %2".arg(tool.light).arg(data.light));
124+ function test_dark_data() {
126+ { tag: "default", index: 0, dark: "grey" },
127+ { tag: "red on black", index: 1, dark: "black" },
128+ { tag: "green on white", index: 2, dark: "green" },
129+ { tag: "blue on darkgrey", index: 3, dark: "blue" },
133+ function test_dark(data) {
134+ tool.style = testCase.styles[data.index];
135+ verify(Qt.colorEqual(tool.dark, data.dark),
136+ "Dark color not equal: %1 != %2".arg(tool.dark).arg(data.dark));