OpenCoverage

qpoint.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qpoint.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QDataStream &operator<<(QDataStream &s, const QPoint &p)-
5{-
6 if (s.version() == 1
s.version() == 1Description
TRUEnever evaluated
FALSEevaluated 159 times by 6 tests
Evaluated by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
)
0-159
7 s << (qint16)p.x() << (qint16)p.y();
never executed: s << (qint16)p.x() << (qint16)p.y();
0
8 else-
9 s << (qint32)p.x() << (qint32)p.y();
executed 159 times by 6 tests: s << (qint32)p.x() << (qint32)p.y();
Executed by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
159
10 return
executed 159 times by 6 tests: return s;
Executed by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
s;
executed 159 times by 6 tests: return s;
Executed by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
159
11}-
12QDataStream &operator>>(QDataStream &s, QPoint &p)-
13{-
14 if (s.version() == 1
s.version() == 1Description
TRUEnever evaluated
FALSEevaluated 171 times by 6 tests
Evaluated by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
) {
0-171
15 qint16 x, y;-
16 s >> x; p.rx() = x;-
17 s >> y; p.ry() = y;-
18 }
never executed: end of block
0
19 else {-
20 qint32 x, y;-
21 s >> x; p.rx() = x;-
22 s >> y; p.ry() = y;-
23 }
executed 171 times by 6 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
171
24 return
executed 171 times by 6 tests: return s;
Executed by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
s;
executed 171 times by 6 tests: return s;
Executed by:
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPoint
  • tst_QSettings
  • tst_QVariant
171
25}-
26QDebug operator<<(QDebug dbg, const QPoint &p)-
27{-
28 QDebugStateSaver saver(dbg);-
29 dbg.nospace();-
30 dbg << "QPoint" << '(';-
31 QtDebugUtils::formatQPoint(dbg, p);-
32 dbg << ')';-
33 return
executed 34 times by 5 tests: return dbg;
Executed by:
  • tst_QDebug
  • tst_QGraphicsProxyWidget
  • tst_QVariant
  • tst_QWidget
  • tst_QWindow
dbg;
executed 34 times by 5 tests: return dbg;
Executed by:
  • tst_QDebug
  • tst_QGraphicsProxyWidget
  • tst_QVariant
  • tst_QWidget
  • tst_QWindow
34
34}-
35-
36QDebug operator<<(QDebug dbg, const QPointF &p)-
37{-
38 QDebugStateSaver saver(dbg);-
39 dbg.nospace();-
40 dbg << "QPointF" << '(';-
41 QtDebugUtils::formatQPoint(dbg, p);-
42 dbg << ')';-
43 return
executed 6 times by 2 tests: return dbg;
Executed by:
  • tst_QDebug
  • tst_QVariant
dbg;
executed 6 times by 2 tests: return dbg;
Executed by:
  • tst_QDebug
  • tst_QVariant
6
44}-
45QDataStream &operator<<(QDataStream &s, const QPointF &p)-
46{-
47 s << double(p.x()) << double(p.y());-
48 return
executed 256 times by 10 tests: return s;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QVariant
s;
executed 256 times by 10 tests: return s;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QStyleSheetStyle
  • tst_QVariant
256
49}-
50QDataStream &operator>>(QDataStream &s, QPointF &p)-
51{-
52 double x, y;-
53 s >> x;-
54 s >> y;-
55 p.setX(qreal(x));-
56 p.setY(qreal(y));-
57 return
executed 136 times by 9 tests: return s;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QVariant
s;
executed 136 times by 9 tests: return s;
Executed by:
  • tst_QBrush
  • tst_QDataStream
  • tst_QGuiVariant
  • tst_QMetaType
  • tst_QPen
  • tst_QPicture
  • tst_QPointF
  • tst_QPrinter
  • tst_QVariant
136
58}-
59-
60-
61-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9