Skip to content

Commit aa325ea

Browse files
committed
Simplify test suite a bit
1 parent efeafb7 commit aa325ea

6 files changed

Lines changed: 1843 additions & 1818 deletions

File tree

tests/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ publish = false
1010

1111
[dependencies]
1212
fontdb = { workspace = true }
13-
svg2pdf = { workspace = true }
13+
svg2pdf = { workspace = true, default-features = true }
1414
usvg = { workspace = true }
1515
pdfium-render = { workspace = true, features = ["sync"] }
1616
pdf-writer = { workspace = true }

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ that cover certain other edge cases and some integration tests specific to `svg2
2525

2626
# Tests
2727

28-
We use a Python script to generate the `library.rs` file, which tests all of the svg files
28+
We use a Python script to generate the `integration.rs` file, which tests all of the svg files
2929
that are part of the test suites. SVG files which don't have a corresponding reference image
3030
will be skipped. To regenerate this file, you can simply run `./scripts/gen-tests.py` and
3131
it should work out of the box.

tests/scripts/gen-tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from common import SVG_DIR, ROOT, TestFile
66
from pathlib import Path
77

8-
OUT_PATH = ROOT / "src" / "library.rs"
8+
OUT_PATH = ROOT / "src" / "integration.rs"
99

1010
NO_RELATIVE_PATHS = "no relative paths supported"
1111
INVESTIGATE = "need to investigate"
@@ -107,7 +107,7 @@ def main():
107107

108108
test_string += "#[test] "
109109

110-
test_string += f'fn {function_name}() {{assert_eq!(run_test("{test_file.svg_path()}", "{test_file.ref_path()}", "{test_file.diff_path()}"), 0)}}\n'
110+
test_string += f'fn {function_name}() {{assert_eq!(run_test("{test_file.test_name()}"), 0)}}\n'
111111

112112
with open(Path(OUT_PATH), "w") as file:
113113
file.write(test_string)

0 commit comments

Comments
 (0)