mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Add failing Color cloning tests.
This commit is contained in:
parent
888a5cf348
commit
1cdaa3a86b
1 changed files with 11 additions and 0 deletions
|
@ -159,3 +159,14 @@ test('Color.read(channels)', function() {
|
||||||
var color = Color.read([0, 0, 1]);
|
var color = Color.read([0, 0, 1]);
|
||||||
compareRGBColors(color, [0, 0, 1, 1]);
|
compareRGBColors(color, [0, 0, 1, 1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Cloning colors', function() {
|
||||||
|
var color = new RGBColor(0, 0, 0);
|
||||||
|
equals(function() {
|
||||||
|
return color.clone() != color;
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
equals(function() {
|
||||||
|
return new RGBColor(color) != color;
|
||||||
|
}, true);
|
||||||
|
});
|
Loading…
Reference in a new issue