Add failing raster test where creating a raster without a source and then setting its size throws an error.

This commit is contained in:
Jonathan Puckey 2013-03-17 16:52:54 +01:00
parent f4c1f6a3c1
commit 15dab4c2db
2 changed files with 21 additions and 0 deletions

19
test/tests/Raster.js Normal file
View file

@ -0,0 +1,19 @@
/*
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey
* http://lehni.org/ & http://jonathanpuckey.com/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*/
module('Raster');
test('Create a raster without a source and set its size', function() {
var raster = new Raster();
raster.size = [640, 480];
equals(raster.size.toString(), new Size(640, 480).toString(), true);
});

View file

@ -39,6 +39,8 @@
/*#*/ include('PlacedSymbol.js');
/*#*/ include('Raster.js');
/*#*/ include('HitResult.js');
/*#*/ include('SvgImport.js');