From 36c189805fca325b5ca3938785ec19ef35e28c12 Mon Sep 17 00:00:00 2001 From: stdstring Date: Sun, 3 Mar 2024 22:52:13 +0500 Subject: [PATCH] fixed usage of conditional compilation directives --- .../ApiExamples/ExBookmarksOutlineLevelCollection.cs | 2 -- Examples/ApiExamples/ApiExamples/ExDocument.cs | 6 ------ Examples/ApiExamples/ApiExamples/ExDocumentBase.cs | 2 -- Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs | 6 +++--- Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs | 4 +--- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs b/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs index 887e31c2..01291898 100644 --- a/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs +++ b/Examples/ApiExamples/ApiExamples/ExBookmarksOutlineLevelCollection.cs @@ -82,7 +82,6 @@ public void BookmarkLevels() //ExEnd } -#if NET48 || NET5_0_OR_GREATER || JAVA [Test] public void UsePdfBookmarkEditorForBookmarkLevels() { @@ -98,6 +97,5 @@ public void UsePdfBookmarkEditorForBookmarkLevels() Assert.AreEqual("Bookmark 2", bookmarks[1].Title); Assert.AreEqual("Bookmark 3", bookmarks[2].Title); } -#endif } } diff --git a/Examples/ApiExamples/ApiExamples/ExDocument.cs b/Examples/ApiExamples/ApiExamples/ExDocument.cs index 1a48afca..317076c6 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocument.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocument.cs @@ -2025,7 +2025,6 @@ public void LayoutOptionsHiddenText(bool showHiddenText) //ExEnd } -#if NET48 || NET5_0_OR_GREATER || JAVA [TestCase(false)] [TestCase(true)] public void UsePdfDocumentForLayoutOptionsHiddenText(bool showHiddenText) @@ -2040,7 +2039,6 @@ public void UsePdfDocumentForLayoutOptionsHiddenText(bool showHiddenText) $"This text is not hidden.{Environment.NewLine}This text is hidden." : "This text is not hidden.", textAbsorber.Text); } -#endif [TestCase(false)] [TestCase(true)] @@ -2066,7 +2064,6 @@ public void LayoutOptionsParagraphMarks(bool showParagraphMarks) //ExEnd } -#if NET48 || NET5_0_OR_GREATER || JAVA [TestCase(false)] [TestCase(true)] public void UsePdfDocumentForLayoutOptionsParagraphMarks(bool showParagraphMarks) @@ -2081,7 +2078,6 @@ public void UsePdfDocumentForLayoutOptionsParagraphMarks(bool showParagraphMarks $"Hello world!¶{Environment.NewLine}Hello again!¶{Environment.NewLine}¶" : $"Hello world!{Environment.NewLine}Hello again!", textAbsorber.Text.Trim()); } -#endif [Test] public void UpdatePageLayout() @@ -2341,7 +2337,6 @@ public void ShowComments() //ExEnd } -#if NET48 || NET5_0_OR_GREATER || JAVA [Test] public void UsePdfDocumentForShowComments() { @@ -2355,7 +2350,6 @@ public void UsePdfDocumentForShowComments() "Hello world! Commented [J.D.1]: My comment.", textAbsorber.Text); } -#endif [Test] public void CopyTemplateStylesViaDocument() diff --git a/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs b/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs index e9d4e995..59ab275c 100644 --- a/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs +++ b/Examples/ApiExamples/ApiExamples/ExDocumentBase.cs @@ -188,7 +188,6 @@ public void BackgroundShape() }); } -#if NET48 || NET5_0_OR_GREATER || JAVA [Test] public void UsePdfDocumentForBackgroundShape() { @@ -201,7 +200,6 @@ public void UsePdfDocumentForBackgroundShape() Assert.AreEqual(400, pdfDocImage.Height); Assert.AreEqual(ColorType.Rgb, pdfDocImage.GetColorType()); } -#endif //ExStart //ExFor:DocumentBase.ResourceLoadingCallback diff --git a/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs b/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs index 2a158071..434e7fc8 100644 --- a/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs +++ b/Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs @@ -422,7 +422,7 @@ public void PixelFormat(ImagePixelFormat imagePixelFormat) break; case ImagePixelFormat.Format24BppRgb: Assert.That(testedImageLength, Is.LessThan(77000)); - break; + break; case ImagePixelFormat.Format16BppRgb565: case ImagePixelFormat.Format16BppRgb555: case ImagePixelFormat.Format32BppRgb: @@ -433,7 +433,7 @@ public void PixelFormat(ImagePixelFormat imagePixelFormat) Assert.That(testedImageLength, Is.LessThan(132000)); break; } -#endif +#endif } [Test, Category("SkipMono")] @@ -602,7 +602,7 @@ public void TiffImageCompression(TiffCompression tiffCompression) case TiffCompression.Ccitt4: Assert.That(testedImageLength, Is.LessThan(1700)); break; - } + } } [Test] diff --git a/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs b/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs index 8f99ea3e..283cf16d 100644 --- a/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs +++ b/Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs @@ -411,7 +411,6 @@ public void SuppressHyphens(bool suppressAutoHyphens) //ExEnd } -#if NET48 || NET5_0_OR_GREATER || JAVA [TestCase(false)] [TestCase(true)] public void UsePdfDocumentForSuppressHyphens(bool suppressAutoHyphens) @@ -420,7 +419,7 @@ public void UsePdfDocumentForSuppressHyphens(bool suppressAutoHyphens) Aspose.Pdf.Document pdfDoc = new Aspose.Pdf.Document(ArtifactsDir + "ParagraphFormat.SuppressHyphens.pdf"); TextAbsorber textAbsorber = new TextAbsorber(); - textAbsorber.Visit(pdfDoc); + textAbsorber.Visit(pdfDoc); if (suppressAutoHyphens) Assert.True(textAbsorber.Text.Replace(" ", " ").Contains($"La ob storen an deinen am sachen. {Environment.NewLine}" + @@ -431,7 +430,6 @@ public void UsePdfDocumentForSuppressHyphens(bool suppressAutoHyphens) $"pelte um da am spateren verlogen ge-{Environment.NewLine}" + $"kommen achtzehn blaulich.")); } -#endif [Test] public void ParagraphSpacingAndIndents()