Skip to content

Commit

Permalink
fixed usage of conditional compilation directives
Browse files Browse the repository at this point in the history
  • Loading branch information
stdstring committed Mar 3, 2024
1 parent 1fce19d commit 36c1898
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public void BookmarkLevels()
//ExEnd
}

#if NET48 || NET5_0_OR_GREATER || JAVA
[Test]
public void UsePdfBookmarkEditorForBookmarkLevels()
{
Expand All @@ -98,6 +97,5 @@ public void UsePdfBookmarkEditorForBookmarkLevels()
Assert.AreEqual("Bookmark 2", bookmarks[1].Title);
Assert.AreEqual("Bookmark 3", bookmarks[2].Title);
}
#endif
}
}
6 changes: 0 additions & 6 deletions Examples/ApiExamples/ApiExamples/ExDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)]
Expand All @@ -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)
Expand All @@ -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()
Expand Down Expand Up @@ -2341,7 +2337,6 @@ public void ShowComments()
//ExEnd
}

#if NET48 || NET5_0_OR_GREATER || JAVA
[Test]
public void UsePdfDocumentForShowComments()
{
Expand All @@ -2355,7 +2350,6 @@ public void UsePdfDocumentForShowComments()
"Hello world! Commented [J.D.1]: My comment.",
textAbsorber.Text);
}
#endif

[Test]
public void CopyTemplateStylesViaDocument()
Expand Down
2 changes: 0 additions & 2 deletions Examples/ApiExamples/ApiExamples/ExDocumentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ public void BackgroundShape()
});
}

#if NET48 || NET5_0_OR_GREATER || JAVA
[Test]
public void UsePdfDocumentForBackgroundShape()
{
Expand All @@ -201,7 +200,6 @@ public void UsePdfDocumentForBackgroundShape()
Assert.AreEqual(400, pdfDocImage.Height);
Assert.AreEqual(ColorType.Rgb, pdfDocImage.GetColorType());
}
#endif

//ExStart
//ExFor:DocumentBase.ResourceLoadingCallback
Expand Down
6 changes: 3 additions & 3 deletions Examples/ApiExamples/ApiExamples/ExImageSaveOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -433,7 +433,7 @@ public void PixelFormat(ImagePixelFormat imagePixelFormat)
Assert.That(testedImageLength, Is.LessThan(132000));
break;
}
#endif
#endif
}

[Test, Category("SkipMono")]
Expand Down Expand Up @@ -602,7 +602,7 @@ public void TiffImageCompression(TiffCompression tiffCompression)
case TiffCompression.Ccitt4:
Assert.That(testedImageLength, Is.LessThan(1700));
break;
}
}
}

[Test]
Expand Down
4 changes: 1 addition & 3 deletions Examples/ApiExamples/ApiExamples/ExParagraphFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}" +
Expand All @@ -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()
Expand Down

0 comments on commit 36c1898

Please sign in to comment.