Adjust the unit tests for revision 197/bug 714717 (Optimizing some cubic beziers away). The behavior of the unit test checking for "c<nonzero> <nonzero> <zero>" being removed is now correct again.

This commit is contained in:
Louis Simard 2011-02-09 16:11:33 -05:00
parent 04d72454c5
commit 2b68c7ed37
2 changed files with 3 additions and 3 deletions

View file

@ -741,7 +741,7 @@ class RereferenceForRadialGradient(unittest.TestCase):
class CollapseSamePathPoints(unittest.TestCase): class CollapseSamePathPoints(unittest.TestCase):
def runTest(self): def runTest(self):
p = scour.scourXmlFile('unittests/collapse-same-path-points.svg').getElementsByTagNameNS(SVGNS, 'path')[0]; p = scour.scourXmlFile('unittests/collapse-same-path-points.svg').getElementsByTagNameNS(SVGNS, 'path')[0];
self.assertEquals(p.getAttribute('d'), "m100 100l100.12 100.12z", self.assertEquals(p.getAttribute('d'), "m100 100l100.12 100.12c14.88 4.88-15.12-5.12 0 0z",
'Did not collapse same path points') 'Did not collapse same path points')
class ScourUnitlessLengths(unittest.TestCase): class ScourUnitlessLengths(unittest.TestCase):

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="210" height="210">
<path fill="green" d="M100,100 L200.12345,200.12345 C210,210 190,190 200.12,200.12 Z"/> <path stroke="yellow" fill="red" d="M100,100 L200.12345,200.12345 C215,205 185,195 200.12,200.12 Z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 274 B

Before After
Before After