TestsSetup.cs 1.2 KB

123456789101112131415161718192021222324252627282930
  1. using QuestPDF.Helpers;
  2. using QuestPDF.Infrastructure;
  3. namespace QuestPDF.VisualTests
  4. {
  5. [SetUpFixture]
  6. public class TestsSetup
  7. {
  8. [OneTimeSetUp]
  9. public static void Setup()
  10. {
  11. var currentRuntime = NativeDependencyProvider.GetRuntimePlatform();
  12. if (currentRuntime != "osx-arm64")
  13. {
  14. Assert.Ignore(
  15. "Visual tests are performed based on osx-arm64 runtime output. " +
  16. "Each operating system (Windows, Linux, macOS) uses different font analysis and text rendering libraries. " +
  17. "Moreover, each CPU architecture may produce slightly different floating-point calculation results. " +
  18. "This may lead to different results even though the same code and configuration are used. " +
  19. "Therefore, visual tests are not expected to pass entirely on other operating systems or CPU architectures.");
  20. }
  21. QuestPDF.Settings.License = LicenseType.Community;
  22. QuestPDF.Settings.UseEnvironmentFonts = false;
  23. VisualTestEngine.ClearActualOutputDirectories();
  24. }
  25. }
  26. }