[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [tikzkit] tests: int casts to make it compile for me (qt5.5+gcc4.9)
From: Joseph Wenninger <jowenn () kde ! org>
Date: 2015-07-26 21:45:49
Message-ID: E1ZJTjx-0007Sc-94 () scm ! kde ! org
[Download RAW message or body]
Git commit e10f1fef56170d761db487a266cf6ef9b6d63fe4 by Joseph Wenninger.
Committed on 26/07/2015 at 21:33.
Pushed by jowenn into branch 'master'.
int casts to make it compile for me (qt5.5+gcc4.9)
M +2 -2 tests/TestPos.cpp
M +4 -4 tests/TestValue.cpp
http://commits.kde.org/tikzkit/e10f1fef56170d761db487a266cf6ef9b6d63fe4
diff --git a/tests/TestPos.cpp b/tests/TestPos.cpp
index 805c408..ee3b5c1 100644
--- a/tests/TestPos.cpp
+++ b/tests/TestPos.cpp
@@ -40,8 +40,8 @@ void PosTest::testPos()
// test initial value
QCOMPARE(pos.x(), tikz::Value(0.0));
QCOMPARE(pos.y(), tikz::Value(0.0));
- QCOMPARE(pos.x().unit(), tikz::Point);
- QCOMPARE(pos.y().unit(), tikz::Point);
+ QCOMPARE(static_cast<int>(pos.x().unit()), static_cast<int>(tikz::Point));
+ QCOMPARE(static_cast<int>(pos.y().unit()), static_cast<int>(tikz::Point));
QCOMPARE(pos.toString(), QString("(0pt, 0pt)"));
}
diff --git a/tests/TestValue.cpp b/tests/TestValue.cpp
index 25038d9..332dbaa 100644
--- a/tests/TestValue.cpp
+++ b/tests/TestValue.cpp
@@ -52,14 +52,14 @@ void ValueTest::testPoint()
// test initial value
QCOMPARE(val.value(), 0.0);
- QCOMPARE(val.unit(), tikz::Point);
+ QCOMPARE(static_cast<int>(val.unit()), static_cast<int>(tikz::Point));
QCOMPARE(val.toString(), QString("0pt"));
// test floating point value
val = 3.567;
QCOMPARE(val.value(), 3.567);
- QCOMPARE(val.unit(), tikz::Point);
+ QCOMPARE(static_cast<int>(val.unit()), static_cast<int>(tikz::Point));
QCOMPARE(val.toString(), QString("3.567pt"));
// operator += and -=
@@ -84,7 +84,7 @@ void ValueTest::testFromString()
//
// unit: point
//
- QCOMPARE(val.unit(), tikz::Point);
+ QCOMPARE(static_cast<int>(val.unit()), static_cast<int>(tikz::Point));
// test "0pt"
QCOMPARE(val.value(), tikz::Value::fromString("0pt").value());
@@ -115,7 +115,7 @@ void ValueTest::testFromString()
// unit: Millimeter
//
val = tikz::Value(0.0, tikz::Millimeter);
- QCOMPARE(val.unit(), tikz::Millimeter);
+ QCOMPARE(static_cast<int>(val.unit()), static_cast<int>(tikz::Millimeter));
// test "0pt"
QCOMPARE(val.value(), tikz::Value::fromString("0mm").value());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic