Skip to content

Commit

Permalink
Merge branch 'develop' into devsecops
Browse files Browse the repository at this point in the history
  • Loading branch information
aleks-ivanov committed Jan 9, 2025
2 parents 38b3fed + 0395f57 commit d3e3e45
Show file tree
Hide file tree
Showing 1,080 changed files with 454 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,45 @@ public virtual void CollapseConsecutiveWhiteSpacesTabWhiteSpaceTest() {
String expected = " A B ";
NUnit.Framework.Assert.AreEqual(expected, actual);
}

[NUnit.Framework.Test]
public virtual void KeepLineBreaksCollapseSpacesTest() {
String toProcess = "\t A B \n A B \t";
bool keepLineBreaks = true;
bool collapseSpaces = true;
String actual = WhiteSpaceUtil.ProcessWhitespaces(toProcess, keepLineBreaks, collapseSpaces);
String expected = " A B \n A B ";
NUnit.Framework.Assert.AreEqual(expected, actual);
}

[NUnit.Framework.Test]
public virtual void KeepLineBreaksKeepSpacesTest() {
String toProcess = "\t A B \n A B \t";
bool keepLineBreaks = true;
bool collapseSpaces = false;
String actual = WhiteSpaceUtil.ProcessWhitespaces(toProcess, keepLineBreaks, collapseSpaces);
String expected = "\u200d\t A B \n\u200d A B \t";
NUnit.Framework.Assert.AreEqual(expected, actual);
}

[NUnit.Framework.Test]
public virtual void RemoveLineBreaksKeepSpacesTest() {
String toProcess = "\t A B \n A B \t";
bool keepLineBreaks = false;
bool collapseSpaces = true;
String actual = WhiteSpaceUtil.ProcessWhitespaces(toProcess, keepLineBreaks, collapseSpaces);
String expected = " A B A B ";
NUnit.Framework.Assert.AreEqual(expected, actual);
}

[NUnit.Framework.Test]
public virtual void RemoveLineBreaksCollapseSpacesInvalidTest() {
String toProcess = "\t A B \n A B \t";
bool keepLineBreaks = false;
bool collapseSpaces = false;
String actual = WhiteSpaceUtil.ProcessWhitespaces(toProcess, keepLineBreaks, collapseSpaces);
String expected = "\u200d\t A B \n\u200d A B \t";
NUnit.Framework.Assert.AreEqual(expected, actual);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public virtual void UseXAndYEmAndRemTest() {

[NUnit.Framework.Test]
public virtual void UseWidthPercentTest() {
// TODO DEVSIX-4566 Processing of width&height attributes in use tag are not currently supported
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "useWidthPercentTest");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public virtual void SankeyColoredChart() {

[NUnit.Framework.Test]
public virtual void SankeyFontsChart() {
// TODO DEVSIX-2905
ConvertAndCompare(sourceFolder, destinationFolder, "sankeyFontsChart");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static void BeforeClass() {
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER);
}

//TODO DEVSIX-5740: Update cmp file after supporting
[NUnit.Framework.Test]
public virtual void RelativePositionsBasic1Test() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsBasic");
Expand All @@ -48,19 +47,19 @@ public virtual void RelativePositionsBasic2Test() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsBasic2");
}

//TODO DEVSIX-5740: Update cmp file after supporting
//TODO DEVSIX-4068: Update cmp file after supporting
[NUnit.Framework.Test]
public virtual void RelativePositionsListValuesTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsListValues");
}

//TODO DEVSIX-5740: Update cmp file after supporting
//TODO DEVSIX-4068: Update cmp file after supporting
[NUnit.Framework.Test]
public virtual void RelativePositionsListValuesNoXTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsListValuesNoX");
}

//TODO DEVSIX-5740: Update cmp file after supporting
//TODO DEVSIX-4068: Update cmp file after supporting
[NUnit.Framework.Test]
public virtual void RelativePositionsListValuesNoYTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "relativePositionsListValuesNoY");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ You should have received a copy of the GNU Affero General Public License
namespace iText.Svg.Renderers {
[NUnit.Framework.Category("IntegrationTest")]
public class WhiteSpaceTest : SvgIntegrationTest {
//TODO DEVSIX-2284: Update cmp file after supporting
private static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/itext/svg/renderers/impl/WhiteSpaceTest/";

Expand Down Expand Up @@ -62,5 +61,18 @@ public virtual void WhiteSpaceNestedTest() {
public virtual void WhiteSpaceRelativePositionsTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "white-space-basic-relative-positions");
}

[NUnit.Framework.Test]
public virtual void WhiteSpaceEmptyTest() {
// This test result is different from browser since we don't add empty (or whitespace only) children to the
// text branch renderer. But even if we will, spaces will be preserved for pre, pre-wrap and pre-line, however
// they shouldn't for pre-wrap and pre-line values.
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "white-space-empty");
}

[NUnit.Framework.Test]
public virtual void WhiteSpaceLeadingTest() {
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "white-space-leading");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public virtual void MarkerPathViewboxRightOrientTest() {

[NUnit.Framework.Test]
public virtual void MarkerPathViewboxRightOrientNoAspectRatioPreservationTest() {
// TODO (DEVSIX-3621) fix cmp after fixing
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "markerPathViewboxRightOrientNoAspectRatioPreservation"
);
}
Expand All @@ -102,7 +101,6 @@ public virtual void MarkerPathViewboxAngledOrientTest() {

[NUnit.Framework.Test]
public virtual void MarkerPathPreserveAspectRatioTest() {
// TODO (DEVSIX-3621) fix cmp after fixing
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "markerPathPreserveAspectRatio");
}

Expand Down Expand Up @@ -305,7 +303,6 @@ public virtual void MarkerEspecialMarkerWidthHeightValuesTest() {

[NUnit.Framework.Test]
public virtual void DeformationWhenRotationAndPreserveAspectRationNoneTest() {
// TODO (DEVSIX-3621) change cmp after fixing
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "deformationWhenRotationAndPreserveAspectRationNone"
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,11 @@ public virtual void LinearGradientSymbolTest() {

[NUnit.Framework.Test]
public virtual void UseHeightWidthAllUnitsTest() {
// TODO DEVSIX-4566 Processing of width&height attributes in use tag are not currently supported
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "useHeightWidthAllUnitsTest", properties);
}

[NUnit.Framework.Test]
public virtual void UseSymbolHeightWidthAllUnitsTest() {
// TODO DEVSIX-4566 Processing of width&height attributes in use tag are not currently supported
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "useSymbolHeightWidthAllUnitsTest", properties
);
}
Expand All @@ -185,7 +183,6 @@ public virtual void UseSymbolCoordinatesContrudictionTest() {

[NUnit.Framework.Test]
public virtual void WidthHeightAttrInteractionTest() {
// TODO DEVSIX-4566 Processing of width&height attributes in use tag are not currently supported
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "widthHeightAttrInteraction", properties);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,31 +301,26 @@ public virtual void TextTextDecorationOverlineTest() {

[NUnit.Framework.Test]
public virtual void TextWhiteSpaceNormalTest() {
//TODO: DEVSIX-2284 update cmp file after fix
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textWhiteSpaceNormal");
}

[NUnit.Framework.Test]
public virtual void TextWhiteSpacePreTest() {
//TODO: DEVSIX-2284 update cmp file after fix
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textWhiteSpacePre");
}

[NUnit.Framework.Test]
public virtual void TextWhiteSpaceNoWrapTest() {
//TODO: DEVSIX-2284 update cmp file after fix
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textWhiteSpaceNoWrap");
}

[NUnit.Framework.Test]
public virtual void TextWhiteSpacePreWrapTest() {
//TODO: DEVSIX-2284 update cmp file after fix
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textWhiteSpacePreWrap");
}

[NUnit.Framework.Test]
public virtual void TextWhiteSpacePreLineTest() {
//TODO: DEVSIX-2284 update cmp file after fix
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "textWhiteSpacePreLine");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using iText.Svg.Logs;
using iText.Svg.Processors;
using iText.Svg.Processors.Impl;
using iText.Svg.Renderers;
using iText.Test;
using iText.Test.Attributes;

namespace iText.Svg.Renderers.Impl {
[NUnit.Framework.Category("IntegrationTest")]
Expand Down Expand Up @@ -154,5 +156,31 @@ public virtual void UseInDifferentFilesExampleTest() {
//TODO: update when DEVSIX-2252 fixed
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "useInDifferentFilesExampleTest");
}

[NUnit.Framework.Test]
public virtual void WidthAndHeightResolvingTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "widthAndHeightResolving", properties);
}

[NUnit.Framework.Test]
public virtual void WidthAndHeightOverridingTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "widthAndHeightOverriding", properties);
}

[NUnit.Framework.Test]
[LogMessage(SvgLogMessageConstant.VIEWBOX_WIDTH_OR_HEIGHT_IS_ZERO, LogLevel = LogLevelConstants.INFO, Count
= 2)]
[LogMessage(iText.IO.Logs.IoLogMessageConstant.ATTEMPT_PROCESS_NAN, LogLevel = LogLevelConstants.ERROR, Count
= 4)]
public virtual void InvalidWidthAndHeightResolvingTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "invalidWidthAndHeightResolving", properties
);
}

[NUnit.Framework.Test]
public virtual void WidthAndHeightNestedResolvingTest() {
ConvertAndCompareSinglePage(SOURCE_FOLDER, DESTINATION_FOLDER, "widthAndHeightNestedResolving", properties
);
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit d3e3e45

Please sign in to comment.