Commit graph

83 commits

Author SHA1 Message Date
Jürg Lehni
5890de3a80 Some more clean-up in unit test helpers code. 2014-12-28 18:23:04 +01:00
Jürg Lehni
644fb71dc1 Implement unit test comparator for Item & co + Project, and further improve new comparator code. 2014-12-28 18:10:53 +01:00
Jürg Lehni
9adbc3774a Implement unit test comparators for many more types, and start refactoring compareItems() helper. 2014-12-28 16:41:23 +01:00
Jürg Lehni
c5a2a51f3e Implement unit test comparator for Color and improve new comparator code. 2014-12-28 15:21:38 +01:00
Jürg Lehni
b8674a3bc1 Implement unit test comparators for Point, Size and Rectangle. 2014-12-28 14:59:48 +01:00
Jürg Lehni
92521d0ac8 Check expected value first for class to be used to perform comparison, since actual value might be wrong. 2014-12-28 14:36:09 +01:00
Jürg Lehni
e95e17826e Start cleaning up unit tests by introducing new class/type-based comparators lookup table. 2014-12-28 14:33:22 +01:00
Jürg Lehni
318209e9e9 Replace compareNumbers() with equals() and improve numerical tolerance handling in test helpers. 2014-11-30 11:27:14 -08:00
Jürg Lehni
48cb05a181 Replace tabs with 4 white-spaces. 2014-08-16 19:24:54 +02:00
Jürg Lehni
f002c633a7 Remove trailing white spaces and ensure newlines at the end. 2014-04-06 13:48:03 +02:00
Jürg Lehni
2010fefcbe Include importSVG() fix for Opera browser. 2014-02-12 09:47:43 +01:00
Jürg Lehni
e22fa3a664 Update copyright notice. 2014-01-04 01:47:16 +01:00
Jürg Lehni
25d8b1f0d2 Clean up code and comments in various places. 2013-12-11 17:10:09 +01:00
Jürg Lehni
83be3cb023 Fix SVGImport tests to work with new Shape import. 2013-10-17 13:02:35 +02:00
Jürg Lehni
092ea182dc Improve tests for moveAbove() / moveBelow(). 2013-07-21 16:11:09 -07:00
Jürg Lehni
4b62949318 Fix tests for #246.
This is actually the right behavior: Setting length to negative values should flip around defined vectors.
2013-06-23 17:22:13 -07:00
Jürg Lehni
fe10c99d1b Implement standard behavior of #_hitTest() for items without children, based on #_contains().
This should cover the minimum of what's needed for PointText.
2013-06-12 19:30:23 -07:00
Jürg Lehni
507520f79d Improve equals() test helper. 2013-06-12 14:56:36 -07:00
Jürg Lehni
b512532d23 Improve compareColors() helper. 2013-06-11 13:53:48 -07:00
Jürg Lehni
90d4834c01 Clean up jsDump modifications a bit. 2013-06-11 13:43:29 -07:00
Jürg Lehni
763ce7f4b1 Update to latest version of QUnit and install jsDump parser for Base objects. 2013-06-11 13:38:08 -07:00
Jürg Lehni
96d9b6730f Rename Svg acronyms in API to SVG. 2013-04-23 07:19:08 -07:00
Jürg Lehni
fbe8a558bd Refactor Format literal to Formatter class that keeps precision stored. 2013-04-09 17:32:19 -07:00
Jürg Lehni
b4a99415d0 Merge PathStyle, CharacterStyle and ParagraphStyle into Style.
Closes #130.
2013-04-09 16:46:20 -07:00
Jürg Lehni
495eef2ee4 Fix issue with precision and PathItem#getAverageColor() tests. 2013-04-09 08:40:41 -07:00
Jürg Lehni
49cf3201f8 Clean up GradientColor tests. 2013-04-09 01:30:42 -07:00
Jürg Lehni
e6fa0085b6 Update all tests that depend on old Adobe Illustrator data to either use better data or more tolerance. 2013-04-08 19:51:14 -07:00
Jürg Lehni
8292112ecd More work on Color and testing. 2013-04-08 07:07:41 -07:00
Jürg Lehni
0aa6c66681 Start refactoring Color tests. 2013-04-08 00:19:47 -07:00
Jürg Lehni
232ea221b4 First batch of large Color refactoring and simplification.
Work in progress.
2013-04-07 10:03:51 -07:00
Jürg Lehni
56bec41877 Fix issues with JSON symbol test code.
Export was working, but testing code was faulty.
2013-03-19 18:52:10 -07:00
Jürg Lehni
3613086a64 Move JSON test helpers to JSON file since they are only used there. 2013-03-19 16:23:05 -07:00
Jonathan Puckey
b22dc173ed Fix comparing of Raster#ppi in compareItems test helper. 2013-03-18 00:17:57 +01:00
Jonathan Puckey
9865d7bdd5 Add raster constructor tests, add async test helper function and test image. 2013-03-17 18:13:55 +01:00
Jonathan Puckey
6bcb393232 Improve Raster comparison in compareItems test helper. 2013-03-17 16:34:05 +01:00
Jonathan Puckey
a535c106a8 Also compare Item#data in compareItems test helper. 2013-03-17 16:15:58 +01:00
Jonathan Puckey
1732c2cbb2 Use Format.number in compareNumbers test helper with same precision as before. 2013-03-17 15:46:42 +01:00
Jonathan Puckey
4719c05403 Fix comparing of PlacedSymbols in compareItems test helper. 2013-03-17 15:39:00 +01:00
Jonathan Puckey
a2e3759fb8 Tests: fix comparing of GradientColor#hilite. 2013-03-17 15:23:01 +01:00
Jonathan Puckey
35d71e9e33 Improve comparePathStyles test helper. 2013-03-17 15:20:14 +01:00
Jonathan Puckey
69ea1bf3fb Add helper for testing JSON exporting and re-importing of projects. 2013-03-17 14:42:20 +01:00
Jürg Lehni
e6ca62da90 Document new equals() helper feature better. 2013-02-08 19:40:36 -08:00
Jürg Lehni
6ae500e6df Make equals() for unit tests more clever.
Supporting tolerance for numbers, and calling of #equals() on expected value.
2013-02-08 19:37:58 -08:00
Jürg Lehni
6c9c16ad3d Update copyright information comments, and year. 2013-01-28 18:03:27 -08:00
Jürg Lehni
7756e90ff9 Make sure cloned items do not receive the same name when placed inside the same parent, use numbered versions instead. 2013-01-20 14:01:43 -08:00
Jürg Lehni
e7d9699999 Define failing test for cloning complex imported SVG compound paths.
Something with #clockwise goes wrong there.
2012-12-01 11:05:48 -08:00
Jürg Lehni
a1ec8b7db1 Fix PointText#point test. 2011-12-20 23:32:28 +01:00
Jürg Lehni
42d0e722db Rename RGBColor -> RgbColor, to avoid clash with native constructor, and follow same naming convention for HsbColor and HslColor, but keep references to old names for PaperScript scopes for now. 2011-11-10 19:16:34 +01:00
Jürg Lehni
5655981f6d Clean up white spaces. 2011-07-07 16:09:02 +02:00
Jürg Lehni
4029e6abf7 Have various compares to output the compared values if they are not equal. 2011-05-26 10:55:39 +01:00