[librsvg: 44/53] Don't generate the errors tests with test-generator




commit 1f4c7266ef3ae405746d53119b448dbb0ffa9f71
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Oct 22 18:31:15 2020 -0500

    Don't generate the errors tests with test-generator
    
    It doesn't play nice with #[ignore], and we'll use that to run the
    errors tests only during the --release run.

 tests/src/errors.rs | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/tests/src/errors.rs b/tests/src/errors.rs
index af32850d..2a171df1 100644
--- a/tests/src/errors.rs
+++ b/tests/src/errors.rs
@@ -1,15 +1,16 @@
 //! Tests for loading errors.
 
 #![cfg(test)]
-use test_generator::test_resources;
 
 use cairo;
 use librsvg::{CairoRenderer, Loader, LoadingError, RenderingError};
 
 use crate::utils::fixture_path;
 
-#[test_resources("tests/fixtures/errors/515-too-many-elements.svgz")]
-fn loading_crash(name: &str) {
+#[test]
+fn too_many_elements() {
+    let name = "tests/fixtures/errors/515-too-many-elements.svgz";
+
     assert!(matches!(
         Loader::new().read_path(fixture_path(name)),
         Err(LoadingError::XmlParseError(_))
@@ -41,12 +42,12 @@ fn rendering_instancing_limit(name: &str) {
     ));
 }
 
-#[test_resources("tests/fixtures/errors/323-nested-use.svg")]
-fn instancing_limit1(name: &str) {
-    rendering_instancing_limit(name);
+#[test]
+fn instancing_limit1() {
+    rendering_instancing_limit("tests/fixtures/errors/323-nested-use.svg");
 }
 
-#[test_resources("tests/fixtures/errors/515-pattern-billion-laughs.svg")]
-fn instancing_limit2(name: &str) {
-    rendering_instancing_limit(name);
+#[test]
+fn instancing_limit2() {
+    rendering_instancing_limit("tests/fixtures/errors/515-pattern-billion-laughs.svg");
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]