{
Color result = testee.findColour('a', col, seq);
/*
- * expect white below threshold of 5
+ * expect white at or below threshold of 5
*/
- Color expected = col < 5 ? Color.white : new Color(50 + 10 * col,
+ Color expected = col <= 5 ? Color.white
+ : new Color(50 + 10 * col,
200 - 10 * col,
150 + 10 * col);
assertEquals(result, expected, "for column " + col);
for (int col = 0; col < WIDTH; col++)
{
/*
- * colours for values >= threshold are graduated
+ * colours for values > threshold are graduated
* range is 6-10 so steps of 100/5 = 20
*/
int factor = col - THRESHOLD_FIVE;
- Color expected = col < 5 ? Color.white : new Color(50 + 20 * factor,
+ Color expected = col <= 5 ? Color.white
+ : new Color(50 + 20 * factor,
200 - 20 * factor,
150 + 20 * factor);
Color result = testee.findColour('a', col, seq);
for (int col = 0; col < WIDTH; col++)
{
Color result = testee.findColour('a', col, seq);
- Color expected = col > 5 ? Color.white : new Color(50 + 10 * col,
+ Color expected = col >= 5 ? Color.white
+ : new Color(50 + 10 * col,
200 - 10 * col, 150 + 10 * col);
assertEquals(result, expected, "for column " + col);
}
for (int col = 0; col < WIDTH; col++)
{
/*
- * colours for values <= threshold are graduated
+ * colours for values < threshold are graduated
* range is 0-5 so steps of 100/5 = 20
*/
- Color expected = col > 5 ? Color.white : new Color(50 + 20 * col,
+ Color expected = col >= 5 ? Color.white
+ : new Color(50 + 20 * col,
200 - 20 * col, 150 + 20 * col);
Color result = testee.findColour('a', col, seq);
assertEquals(result, expected, "for column " + col);