Skip to content

Commit 7b23118

Browse files
ars18wrwiText-CI
authored andcommitted
Add some new SVG tests.
DEVSIX-2044, DEVSIX-2333 Autoported commit. Original commit hash: [c8dc9feec]
1 parent 7841a8e commit 7b23118

File tree

8 files changed

+65
-2
lines changed

8 files changed

+65
-2
lines changed

itext.tests/itext.svg.tests/itext/svg/renderers/impl/PathParsingIntegrationTest.cs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,27 @@ public virtual void MoreThanOneHParam() {
130130
ConvertAndCompareVisually(sourceFolder, destinationFolder, "moreThanOneHParam");
131131
}
132132

133+
/// <exception cref="System.IO.IOException"/>
134+
/// <exception cref="System.Exception"/>
135+
[NUnit.Framework.Test]
136+
public virtual void NegativeAfterPositiveHandlingTest01() {
137+
ConvertAndCompareVisually(sourceFolder, destinationFolder, "negativeAfterPositiveHandling");
138+
}
139+
140+
/// <exception cref="System.IO.IOException"/>
141+
/// <exception cref="System.Exception"/>
142+
[NUnit.Framework.Test]
143+
public virtual void NegativeAfterPositiveHandlingTest02() {
144+
ConvertAndCompareVisually(sourceFolder, destinationFolder, "negativeAfterPositiveHandlingExtendedViewbox");
145+
}
146+
147+
/// <exception cref="System.IO.IOException"/>
148+
/// <exception cref="System.Exception"/>
149+
[NUnit.Framework.Test]
150+
public virtual void InsignificantSpacesTest() {
151+
ConvertAndCompareVisually(sourceFolder, destinationFolder, "insignificantSpaces");
152+
}
153+
133154
[NUnit.Framework.Test]
134155
public virtual void DecimalPointParsingTest() {
135156
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
@@ -161,7 +182,16 @@ public virtual void DecimalPointParsingTabTest() {
161182
public virtual void DecimalPointParsingMinusTest() {
162183
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
163184
String input = "2.35.96 3.25-.25";
164-
String expected = "2.35 .96 3.25-.25";
185+
String expected = "2.35 .96 3.25 -.25";
186+
String actual = path.SeparateDecimalPoints(input);
187+
NUnit.Framework.Assert.AreEqual(expected, actual);
188+
}
189+
190+
[NUnit.Framework.Test]
191+
public virtual void NegativeAfterPositiveTest() {
192+
PathSvgNodeRenderer path = new PathSvgNodeRenderer();
193+
String input = "40-50";
194+
String expected = "40 -50";
165195
String actual = path.SeparateDecimalPoints(input);
166196
NUnit.Framework.Assert.AreEqual(expected, actual);
167197
}
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 13 additions & 0 deletions
Loading
Lines changed: 13 additions & 0 deletions
Loading

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e99dbe914786cca75c9c578f9f55dba2503be491
1+
c8dc9feec441f2ed9b46c8a5c3b75978eb017f6b

0 commit comments

Comments
 (0)