summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-11-19 21:20:49 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-11-19 21:20:49 +0000
commit5dbdc6f8ca6d4181cc5e7b74beaaf0e4a0bcbed0 (patch)
treed4926389373ec6fc6871fa94e5f02278bbaa4a21
parentWin64: complimentary to rev13689, fix cxxtests on 64bit windows (diff)
downloadinkscape-5dbdc6f8ca6d4181cc5e7b74beaaf0e4a0bcbed0.tar.gz
inkscape-5dbdc6f8ca6d4181cc5e7b74beaaf0e4a0bcbed0.zip
Fix length tests.
svg_length_read is casting the result to float ! (bzr r13739)
-rw-r--r--src/svg/svg-length-test.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/svg/svg-length-test.h b/src/svg/svg-length-test.h
index fbdb7588d..796943e45 100644
--- a/src/svg/svg-length-test.h
+++ b/src/svg/svg-length-test.h
@@ -168,9 +168,9 @@ SvgLengthTest::test_t const SvgLengthTest::absolute_tests[12] = {
{"1e2pt", SVGLength::PT , 100 , 400.0/3.0},
{"3pc", SVGLength::PC , 3 , 48},
{"-3.5pc", SVGLength::PC , -3.5 , -3.5*16.0},
- {"1.2345678mm", SVGLength::MM , 1.2345678, 1.2345678*96.0/25.4}, // TODO: More precise constants? (a 7 digit constant when the default precision is 8 digits?)
- {"123.45678cm", SVGLength::CM , 123.45678 , 123.45678*96.0/2.54},
- {"73.162987in", SVGLength::INCH, 73.162987 , 73.162987*96}};
+ {"1.2345678mm", SVGLength::MM , 1.2345678, 1.2345678f*96.0/25.4}, // TODO: More precise constants? (a 7 digit constant when the default precision is 8 digits?)
+ {"123.45678cm", SVGLength::CM , 123.45678 , 123.45678f*96.0/2.54}, // Note that svg_length_read is casting the result from g_ascii_strtod to float.
+ {"73.162987in", SVGLength::INCH, 73.162987 , 73.162987f*96.0/1.00}};
SvgLengthTest::test_t const SvgLengthTest::relative_tests[3] = {
{"123em", SVGLength::EM, 123, 123. * 7.},
{"123ex", SVGLength::EX, 123, 123. * 13.},