From 083822ff9d63e745d96e9701b4dce073b64235e1 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Thu, 24 Feb 2011 13:00:46 +0100 Subject: [PATCH] Add test for RGBColor#setGray. --- test/tests/Color.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/tests/Color.js b/test/tests/Color.js index 92c2f6aa..f4a561cb 100644 --- a/test/tests/Color.js +++ b/test/tests/Color.js @@ -68,5 +68,11 @@ test('Converting Colors', function() { var color = new GrayColor(0.2); var rgbColor = new RGBColor(color); - compareRGBColors(rgbColor, [ 0.8, 0.8, 0.8, 1 ]); + compareRGBColors(rgbColor, [ 0.8, 0.8, 0.8, 1]); +}); + +test('Setting RGBColor#gray', function() { + var color = new RGBColor(1, 0.5, 0.2); + color.gray = 0.1; + compareRGBColors(color, [ 0.9, 0.9, 0.9, 1]); }); \ No newline at end of file