[librsvg: 9/15] tests: Use existing SVG for rsvg-convert size tests
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 9/15] tests: Use existing SVG for rsvg-convert size tests
- Date: Thu, 13 Feb 2020 01:12:47 +0000 (UTC)
commit c280ecd1bdbb5bfab96987468579ac6058fb076c
Author: Sven Neumann <sven svenfoo org>
Date: Tue Feb 11 15:36:36 2020 +0100
tests: Use existing SVG for rsvg-convert size tests
tests/fixtures/dimensions/units.svg | 5 -----
tests/src/cmdline/rsvg_convert.rs | 36 ++++++++++++++++++------------------
2 files changed, 18 insertions(+), 23 deletions(-)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index 1566accf..50a72874 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -333,86 +333,86 @@ fn huge_zoom_factor_yields_error() {
#[test]
fn default_resolution_is_90dpi() {
- let input = Path::new("fixtures/dimensions/units.svg");
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.assert()
.success()
- .stdout(file::is_png().with_size(262, 184));
+ .stdout(file::is_png().with_size(90, 360));
}
#[test]
fn x_resolution() {
- let input = Path::new("fixtures/dimensions/units.svg");
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.arg("--dpi-x=300")
.assert()
.success()
- .stdout(file::is_png().with_size(874, 184));
+ .stdout(file::is_png().with_size(300, 360));
}
#[test]
fn x_resolution_short_option() {
- let input = Path::new("fixtures/dimensions/units.svg");
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.arg("-d")
.arg("45")
.assert()
.success()
- .stdout(file::is_png().with_size(131, 184));
+ .stdout(file::is_png().with_size(45, 360));
}
#[test]
fn y_resolution() {
- let input = Path::new("fixtures/dimensions/units.svg");
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.arg("--dpi-y=300")
.assert()
.success()
- .stdout(file::is_png().with_size(262, 614));
+ .stdout(file::is_png().with_size(90, 1200));
}
#[test]
fn y_resolution_short_option() {
- let input = Path::new("fixtures/dimensions/units.svg");
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.arg("-p")
.arg("45")
.assert()
.success()
- .stdout(file::is_png().with_size(262, 92));
+ .stdout(file::is_png().with_size(90, 180));
}
#[test]
fn x_and_y_resolution() {
- let input = Path::new("fixtures/dimensions/units.svg");
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.arg("--dpi-x=300")
.arg("--dpi-y=150")
.assert()
.success()
- .stdout(file::is_png().with_size(874, 307));
+ .stdout(file::is_png().with_size(300, 600));
}
#[test]
-fn default_is_used_for_zero_resolution() {
- let input = Path::new("fixtures/dimensions/units.svg");
+fn defaults_are_used_for_zero_resolutions() {
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.arg("--dpi-x=0")
.arg("--dpi-y=0")
.assert()
.success()
- .stdout(file::is_png().with_size(262, 184));
+ .stdout(file::is_png().with_size(90, 360));
}
#[test]
-fn default_is_used_for_negative_resolution() {
- let input = Path::new("fixtures/dimensions/units.svg");
+fn defaults_are_used_for_negative_resolutions() {
+ let input = Path::new("fixtures/api/dpi.svg");
RsvgConvert::new_with_input(input)
.arg("--dpi-x=-100")
.arg("--dpi-y=-100")
.assert()
.success()
- .stdout(file::is_png().with_size(262, 184));
+ .stdout(file::is_png().with_size(90, 360));
}
#[test]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]