OpenCoverage

qchar.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qchar.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8bool QChar::isPrint(uint ucs4) noexcept-
9{-
10 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 206544 times by 79 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusInterface
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • ...
)
0-206544
11 return
never executed: return false;
false;
never executed: return false;
0
12 const int test = (1 << (Other_Control)) |-
13 (1 << (Other_Format)) |-
14 (1 << (Other_Surrogate)) |-
15 (1 << (Other_PrivateUse)) |-
16 (1 << (Other_NotAssigned));-
17 return
executed 206544 times by 79 tests: return !((1 << (qGetProp(ucs4)->category)) & test);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusInterface
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • ...
!((1 << (qGetProp(ucs4)->category)) & test);
executed 206544 times by 79 tests: return !((1 << (qGetProp(ucs4)->category)) & test);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAccessibility
  • tst_QApplication
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusInterface
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QGraphicsItem
  • ...
206544
18}-
19bool QChar::isSpace_helper(uint ucs4) noexcept-
20{-
21 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 315775 times by 44 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QHostInfo
  • tst_QImageReader
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QPlainTextEdit
  • tst_QRawFont
  • tst_QRegExp
  • tst_QSqlQuery
  • tst_QStackedLayout
  • tst_QStaticText
  • ...
)
0-315775
22 return
never executed: return false;
false;
never executed: return false;
0
23 const int test = (1 << (Separator_Space)) |-
24 (1 << (Separator_Line)) |-
25 (1 << (Separator_Paragraph));-
26 return
executed 315775 times by 44 tests: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QHostInfo
  • tst_QImageReader
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QPlainTextEdit
  • tst_QRawFont
  • tst_QRegExp
  • tst_QSqlQuery
  • tst_QStackedLayout
  • tst_QStaticText
  • ...
(1 << (qGetProp(ucs4)->category)) & test;
executed 315775 times by 44 tests: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QHostInfo
  • tst_QImageReader
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QPlainTextEdit
  • tst_QRawFont
  • tst_QRegExp
  • tst_QSqlQuery
  • tst_QStackedLayout
  • tst_QStaticText
  • ...
315775
27}-
28bool QChar::isMark(uint ucs4) noexcept-
29{-
30 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 16148 times by 3 tests
Evaluated by:
  • tst_QRegExp
  • tst_QString
  • tst_qmakelib
)
0-16148
31 return
never executed: return false;
false;
never executed: return false;
0
32 const int test = (1 << (Mark_NonSpacing)) |-
33 (1 << (Mark_SpacingCombining)) |-
34 (1 << (Mark_Enclosing));-
35 return
executed 16148 times by 3 tests: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QRegExp
  • tst_QString
  • tst_qmakelib
(1 << (qGetProp(ucs4)->category)) & test;
executed 16148 times by 3 tests: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QRegExp
  • tst_QString
  • tst_qmakelib
16148
36}-
37bool QChar::isPunct(uint ucs4) noexcept-
38{-
39 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
40 return
never executed: return false;
false;
never executed: return false;
0
41 const int test = (1 << (Punctuation_Connector)) |-
42 (1 << (Punctuation_Dash)) |-
43 (1 << (Punctuation_Open)) |-
44 (1 << (Punctuation_Close)) |-
45 (1 << (Punctuation_InitialQuote)) |-
46 (1 << (Punctuation_FinalQuote)) |-
47 (1 << (Punctuation_Other));-
48 return
never executed: return (1 << (qGetProp(ucs4)->category)) & test;
(1 << (qGetProp(ucs4)->category)) & test;
never executed: return (1 << (qGetProp(ucs4)->category)) & test;
0
49}-
50bool QChar::isSymbol(uint ucs4) noexcept-
51{-
52 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
53 return
never executed: return false;
false;
never executed: return false;
0
54 const int test = (1 << (Symbol_Math)) |-
55 (1 << (Symbol_Currency)) |-
56 (1 << (Symbol_Modifier)) |-
57 (1 << (Symbol_Other));-
58 return
never executed: return (1 << (qGetProp(ucs4)->category)) & test;
(1 << (qGetProp(ucs4)->category)) & test;
never executed: return (1 << (qGetProp(ucs4)->category)) & test;
0
59}-
60bool QChar::isLetter_helper(uint ucs4) noexcept-
61{-
62 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 128 times by 1 test
Evaluated by:
  • tst_QChar
)
0-128
63 return
never executed: return false;
false;
never executed: return false;
0
64 const int test = (1 << (Letter_Uppercase)) |-
65 (1 << (Letter_Lowercase)) |-
66 (1 << (Letter_Titlecase)) |-
67 (1 << (Letter_Modifier)) |-
68 (1 << (Letter_Other));-
69 return
executed 128 times by 1 test: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QChar
(1 << (qGetProp(ucs4)->category)) & test;
executed 128 times by 1 test: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QChar
128
70}-
71bool QChar::isNumber_helper(uint ucs4) noexcept-
72{-
73 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
74 return
never executed: return false;
false;
never executed: return false;
0
75 const int test = (1 << (Number_DecimalDigit)) |-
76 (1 << (Number_Letter)) |-
77 (1 << (Number_Other));-
78 return
never executed: return (1 << (qGetProp(ucs4)->category)) & test;
(1 << (qGetProp(ucs4)->category)) & test;
never executed: return (1 << (qGetProp(ucs4)->category)) & test;
0
79}-
80bool QChar::isLetterOrNumber_helper(uint ucs4) noexcept-
81{-
82 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 81818 times by 36 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QRawFont
  • tst_QRegExp
  • tst_QSpinBox
  • tst_QStackedLayout
  • tst_QStaticText
  • tst_QTableView
  • ...
)
0-81818
83 return
never executed: return false;
false;
never executed: return false;
0
84 const int test = (1 << (Letter_Uppercase)) |-
85 (1 << (Letter_Lowercase)) |-
86 (1 << (Letter_Titlecase)) |-
87 (1 << (Letter_Modifier)) |-
88 (1 << (Letter_Other)) |-
89 (1 << (Number_DecimalDigit)) |-
90 (1 << (Number_Letter)) |-
91 (1 << (Number_Other));-
92 return
executed 81818 times by 36 tests: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QRawFont
  • tst_QRegExp
  • tst_QSpinBox
  • tst_QStackedLayout
  • tst_QStaticText
  • tst_QTableView
  • ...
(1 << (qGetProp(ucs4)->category)) & test;
executed 81818 times by 36 tests: return (1 << (qGetProp(ucs4)->category)) & test;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QColorDialog
  • tst_QComplexText
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDatabase
  • tst_QFontMetrics
  • tst_QGlyphRun
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QMdiArea
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QRawFont
  • tst_QRegExp
  • tst_QSpinBox
  • tst_QStackedLayout
  • tst_QStaticText
  • tst_QTableView
  • ...
81818
93}-
94int QChar::digitValue(uint ucs4) noexcept-
95{-
96 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 5797012 times by 430 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • ...
)
1-5797012
97 return
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QChar
-1;
executed 1 time by 1 test: return -1;
Executed by:
  • tst_QChar
1
98 return
executed 5797012 times by 430 tests: return qGetProp(ucs4)->digitValue;
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • ...
qGetProp(ucs4)->digitValue;
executed 5797012 times by 430 tests: return qGetProp(ucs4)->digitValue;
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • ...
5797012
99}-
100QChar::Category QChar::category(uint ucs4) noexcept-
101{-
102 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 9539049 times by 132 tests
Evaluated by:
  • tst_Collections
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • ...
)
1-9539049
103 return
executed 1 time by 1 test: return QChar::Other_NotAssigned;
Executed by:
  • tst_QChar
QChar::Other_NotAssigned;
executed 1 time by 1 test: return QChar::Other_NotAssigned;
Executed by:
  • tst_QChar
1
104 return
executed 9539049 times by 132 tests: return (QChar::Category) qGetProp(ucs4)->category;
Executed by:
  • tst_Collections
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • ...
(QChar::Category) qGetProp(ucs4)->category;
executed 9539049 times by 132 tests: return (QChar::Category) qGetProp(ucs4)->category;
Executed by:
  • tst_Collections
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • ...
9539049
105}-
106QChar::Direction QChar::direction(uint ucs4) noexcept-
107{-
108 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 1879525 times by 104 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • ...
)
0-1879525
109 return
never executed: return QChar::DirL;
QChar::DirL;
never executed: return QChar::DirL;
0
110 return
executed 1879525 times by 104 tests: return (QChar::Direction) qGetProp(ucs4)->direction;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • ...
(QChar::Direction) qGetProp(ucs4)->direction;
executed 1879525 times by 104 tests: return (QChar::Direction) qGetProp(ucs4)->direction;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDatabase
  • ...
1879525
111}-
112QChar::JoiningType QChar::joiningType(uint ucs4) noexcept-
113{-
114 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 2169 times by 14 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontMetrics
  • tst_QListView
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_languageChange
)
0-2169
115 return
never executed: return QChar::Joining_None;
QChar::Joining_None;
never executed: return QChar::Joining_None;
0
116 return
executed 2169 times by 14 tests: return QChar::JoiningType(qGetProp(ucs4)->joining);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontMetrics
  • tst_QListView
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_languageChange
QChar::JoiningType(qGetProp(ucs4)->joining);
executed 2169 times by 14 tests: return QChar::JoiningType(qGetProp(ucs4)->joining);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QChar
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontMetrics
  • tst_QListView
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QWidget
  • tst_languageChange
2169
117}-
118QChar::Joining QChar::joining(uint ucs4) noexcept-
119{-
120 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
121 return
never executed: return QChar::OtherJoining;
QChar::OtherJoining;
never executed: return QChar::OtherJoining;
0
122 switch (qGetProp(ucs4)->joining) {-
123 case
never executed: case QChar::Joining_Causing:
QChar::Joining_Causing:
never executed: case QChar::Joining_Causing:
return
never executed: return QChar::Center;
QChar::Center;
never executed: return QChar::Center;
0
124 case
never executed: case QChar::Joining_Dual:
QChar::Joining_Dual:
never executed: case QChar::Joining_Dual:
return
never executed: return QChar::Dual;
QChar::Dual;
never executed: return QChar::Dual;
0
125 case
never executed: case QChar::Joining_Right:
QChar::Joining_Right:
never executed: case QChar::Joining_Right:
return
never executed: return QChar::Right;
QChar::Right;
never executed: return QChar::Right;
0
126 default
never executed: default:
:
never executed: default:
break;
never executed: break;
0
127 }-
128 return
never executed: return QChar::OtherJoining;
QChar::OtherJoining;
never executed: return QChar::OtherJoining;
0
129}-
130bool QChar::hasMirrored(uint ucs4) noexcept-
131{-
132 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QChar
)
0-4
133 return
never executed: return false;
false;
never executed: return false;
0
134 return
executed 4 times by 1 test: return qGetProp(ucs4)->mirrorDiff != 0;
Executed by:
  • tst_QChar
qGetProp(ucs4)->mirrorDiff != 0;
executed 4 times by 1 test: return qGetProp(ucs4)->mirrorDiff != 0;
Executed by:
  • tst_QChar
4
135}-
136uint QChar::mirroredChar(uint ucs4) noexcept-
137{-
138 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 129532 times by 12 tests
Evaluated by:
  • tst_QChar
  • tst_QComplexText
  • tst_QFontDatabase
  • tst_QGlyphRun
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QRawFont
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTreeWidget
)
0-129532
139 return
never executed: return ucs4;
ucs4;
never executed: return ucs4;
0
140 return
executed 129532 times by 12 tests: return ucs4 + qGetProp(ucs4)->mirrorDiff;
Executed by:
  • tst_QChar
  • tst_QComplexText
  • tst_QFontDatabase
  • tst_QGlyphRun
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QRawFont
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTreeWidget
ucs4 + qGetProp(ucs4)->mirrorDiff;
executed 129532 times by 12 tests: return ucs4 + qGetProp(ucs4)->mirrorDiff;
Executed by:
  • tst_QChar
  • tst_QComplexText
  • tst_QFontDatabase
  • tst_QGlyphRun
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiArea
  • tst_QRawFont
  • tst_QTextEdit
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTreeWidget
129532
141}-
142-
143-
144-
145enum {-
146 Hangul_SBase = 0xac00,-
147 Hangul_LBase = 0x1100,-
148 Hangul_VBase = 0x1161,-
149 Hangul_TBase = 0x11a7,-
150 Hangul_LCount = 19,-
151 Hangul_VCount = 21,-
152 Hangul_TCount = 28,-
153 Hangul_NCount = Hangul_VCount * Hangul_TCount,-
154 Hangul_SCount = Hangul_LCount * Hangul_NCount-
155};-
156-
157-
158static const unsigned short * decompositionHelper-
159 (uint ucs4, int *length, int *tag, unsigned short *buffer)-
160{-
161 if (ucs4 >= Hangul_SBase
ucs4 >= Hangul_SBaseDescription
TRUEevaluated 90024 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 507118 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
&& ucs4 < Hangul_SBase + Hangul_SCount
ucs4 < Hangul_... Hangul_SCountDescription
TRUEevaluated 68216 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 21808 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
21808-507118
162-
163 const uint SIndex = ucs4 - Hangul_SBase;-
164 buffer[0] = Hangul_LBase + SIndex / Hangul_NCount;-
165 buffer[1] = Hangul_VBase + (SIndex % Hangul_NCount) / Hangul_TCount;-
166 buffer[2] = Hangul_TBase + SIndex % Hangul_TCount;-
167 *length = buffer[2] == Hangul_TBase
buffer[2] == Hangul_TBaseDescription
TRUEevaluated 3573 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 64643 times by 1 test
Evaluated by:
  • tst_QChar
? 2 : 3;
3573-64643
168 *tag = QChar::Canonical;-
169 return
executed 68216 times by 1 test: return buffer;
Executed by:
  • tst_QChar
buffer;
executed 68216 times by 1 test: return buffer;
Executed by:
  • tst_QChar
68216
170 }-
171-
172 const unsigned short index = (ucs4 < 0x3400
ucs4 < 0x3400Description
TRUEevaluated 499564 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 29362 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
? (uc_decomposition_trie[uc_decomposition_trie[ucs4>>4] + (ucs4 & 0xf)]) : (ucs4 < 0x30000
ucs4 < 0x30000Description
TRUEevaluated 29362 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEnever evaluated
? uc_decomposition_trie[uc_decomposition_trie[((ucs4 - 0x3400)>>8) + 0x340] + (ucs4 & 0xff)] : 0xffff));
0-499564
173 if (index == 0xffff
index == 0xffffDescription
TRUEevaluated 491040 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 37886 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
) {
37886-491040
174 *length = 0;-
175 *tag = QChar::NoDecomposition;-
176 return
executed 491040 times by 3 tests: return 0;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
0;
executed 491040 times by 3 tests: return 0;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
491040
177 }-
178-
179 const unsigned short *decomposition = uc_decomposition_map+index;-
180 *tag = (*decomposition) & 0xff;-
181 *length = (*decomposition) >> 8;-
182 return
executed 37886 times by 3 tests: return decomposition+1;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
decomposition+1;
executed 37886 times by 3 tests: return decomposition+1;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
37886
183}-
184-
185-
186-
187-
188-
189QString QChar::decomposition() const-
190{-
191 return
never executed: return QChar::decomposition(ucs);
QChar::decomposition(ucs);
never executed: return QChar::decomposition(ucs);
0
192}-
193-
194-
195-
196-
197-
198-
199QString QChar::decomposition(uint ucs4)-
200{-
201 unsigned short buffer[3];-
202 int length;-
203 int tag;-
204 const unsigned short *d = decompositionHelper(ucs4, &length, &tag, buffer);-
205 return
executed 5 times by 1 test: return QString(reinterpret_cast<const QChar *>(d), length);
Executed by:
  • tst_QChar
QString(reinterpret_cast<const QChar *>(d), length);
executed 5 times by 1 test: return QString(reinterpret_cast<const QChar *>(d), length);
Executed by:
  • tst_QChar
5
206}-
207QChar::Decomposition QChar::decompositionTag(uint ucs4) noexcept-
208{-
209 if (ucs4 >= Hangul_SBase
ucs4 >= Hangul_SBaseDescription
TRUEevaluated 22368 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 1275746 times by 85 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
&& ucs4 < Hangul_SBase + Hangul_SCount
ucs4 < Hangul_... Hangul_SCountDescription
TRUEevaluated 22344 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_QChar
)
24-1275746
210 return
executed 22344 times by 1 test: return QChar::Canonical;
Executed by:
  • tst_QChar
QChar::Canonical;
executed 22344 times by 1 test: return QChar::Canonical;
Executed by:
  • tst_QChar
22344
211 const unsigned short index = (ucs4 < 0x3400
ucs4 < 0x3400Description
TRUEevaluated 1275746 times by 85 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_QChar
? (uc_decomposition_trie[uc_decomposition_trie[ucs4>>4] + (ucs4 & 0xf)]) : (ucs4 < 0x30000
ucs4 < 0x30000Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
? uc_decomposition_trie[uc_decomposition_trie[((ucs4 - 0x3400)>>8) + 0x340] + (ucs4 & 0xff)] : 0xffff));
0-1275746
212 if (index == 0xffff
index == 0xffffDescription
TRUEevaluated 1220096 times by 85 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
FALSEevaluated 55674 times by 7 tests
Evaluated by:
  • tst_QChar
  • tst_QDoubleSpinBox
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QSpinBox
  • tst_QTextLayout
)
55674-1220096
213 return
executed 1220096 times by 85 tests: return QChar::NoDecomposition;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
QChar::NoDecomposition;
executed 1220096 times by 85 tests: return QChar::NoDecomposition;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • ...
1220096
214 return
executed 55674 times by 7 tests: return (QChar::Decomposition)(uc_decomposition_map[index] & 0xff);
Executed by:
  • tst_QChar
  • tst_QDoubleSpinBox
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QSpinBox
  • tst_QTextLayout
(QChar::Decomposition)(uc_decomposition_map[index] & 0xff);
executed 55674 times by 7 tests: return (QChar::Decomposition)(uc_decomposition_map[index] & 0xff);
Executed by:
  • tst_QChar
  • tst_QDoubleSpinBox
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QPlainTextEdit
  • tst_QSpinBox
  • tst_QTextLayout
55674
215}-
216unsigned char QChar::combiningClass(uint ucs4) noexcept-
217{-
218 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 5518214 times by 112 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • ...
)
0-5518214
219 return
never executed: return 0;
0;
never executed: return 0;
0
220 return
executed 5518214 times by 112 tests: return (unsigned char) qGetProp(ucs4)->combiningClass;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • ...
(unsigned char) qGetProp(ucs4)->combiningClass;
executed 5518214 times by 112 tests: return (unsigned char) qGetProp(ucs4)->combiningClass;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QErrorMessage
  • tst_QFileDialog2
  • ...
5518214
221}-
222QChar::Script QChar::script(uint ucs4) noexcept-
223{-
224 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 2639 times by 62 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • tst_QGraphicsItem
  • ...
)
0-2639
225 return
never executed: return QChar::Script_Unknown;
QChar::Script_Unknown;
never executed: return QChar::Script_Unknown;
0
226 return
executed 2639 times by 62 tests: return (QChar::Script) qGetProp(ucs4)->script;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • tst_QGraphicsItem
  • ...
(QChar::Script) qGetProp(ucs4)->script;
executed 2639 times by 62 tests: return (QChar::Script) qGetProp(ucs4)->script;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDialog
  • tst_QDockWidget
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDatabase
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QFormLayout
  • tst_QGraphicsItem
  • ...
2639
227}-
228QChar::UnicodeVersion QChar::unicodeVersion(uint ucs4) noexcept-
229{-
230 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 609469 times by 6 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QNetworkCookie
  • tst_QUrl
  • tst_QUrlInternal
)
1-609469
231 return
executed 1 time by 1 test: return QChar::Unicode_Unassigned;
Executed by:
  • tst_QChar
QChar::Unicode_Unassigned;
executed 1 time by 1 test: return QChar::Unicode_Unassigned;
Executed by:
  • tst_QChar
1
232 return
executed 609469 times by 6 tests: return (QChar::UnicodeVersion) qGetProp(ucs4)->unicodeVersion;
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QNetworkCookie
  • tst_QUrl
  • tst_QUrlInternal
(QChar::UnicodeVersion) qGetProp(ucs4)->unicodeVersion;
executed 609469 times by 6 tests: return (QChar::UnicodeVersion) qGetProp(ucs4)->unicodeVersion;
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QNetworkCookie
  • tst_QUrl
  • tst_QUrlInternal
609469
233}-
234-
235-
236-
237-
238QChar::UnicodeVersion QChar::currentUnicodeVersion() noexcept-
239{-
240 return
executed 565704 times by 4 tests: return QChar::Unicode_8_0;
Executed by:
  • tst_QChar
  • tst_QLabel
  • tst_QTextLayout
  • tst_QTextScriptEngine
QChar::Unicode_8_0;
executed 565704 times by 4 tests: return QChar::Unicode_8_0;
Executed by:
  • tst_QChar
  • tst_QLabel
  • tst_QTextLayout
  • tst_QTextScriptEngine
565704
241}-
242-
243-
244template <typename Traits, typename T>-
245__attribute__((const)) static inline T convertCase_helper(T uc) noexcept-
246{-
247 const QUnicodeTables::Properties *prop = qGetProp(uc);-
248-
249 if (__builtin_expect(!!(Traits::caseSpecial(prop)), false)
__builtin_expe...prop)), false)Description
TRUEevaluated 347 times by 5 tests
Evaluated by:
  • tst_QChar
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
FALSEevaluated 11269411 times by 226 tests
Evaluated by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
) {
347-11269411
250 const ushort *specialCase = specialCaseMap + Traits::caseDiff(prop);-
251-
252 return
executed 347 times by 5 tests: return *specialCase == 1 ? specialCase[1] : uc;
Executed by:
  • tst_QChar
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
*specialCase == 1 ? specialCase[1] : uc;
executed 347 times by 5 tests: return *specialCase == 1 ? specialCase[1] : uc;
Executed by:
  • tst_QChar
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QString
347
253 }-
254-
255 return
executed 11269411 times by 226 tests: return uc + Traits::caseDiff(prop);
Executed by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
uc + Traits::caseDiff(prop);
executed 11269411 times by 226 tests: return uc + Traits::caseDiff(prop);
Executed by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QAsn1Element
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColor
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
11269411
256}-
257uint QChar::toLower(uint ucs4) noexcept-
258{-
259 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 5516452 times by 94 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QChar
  • tst_QCollator
  • tst_QColor
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • ...
)
0-5516452
260 return
never executed: return ucs4;
ucs4;
never executed: return ucs4;
0
261 return
executed 5516452 times by 94 tests: return convertCase_helper<QUnicodeTables::LowercaseTraits>(ucs4);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QChar
  • tst_QCollator
  • tst_QColor
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • ...
convertCase_helper<QUnicodeTables::LowercaseTraits>(ucs4);
executed 5516452 times by 94 tests: return convertCase_helper<QUnicodeTables::LowercaseTraits>(ucs4);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QChar
  • tst_QCollator
  • tst_QColor
  • tst_QComboBox
  • tst_QCompleter
  • tst_QCssParser
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleValidator
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QGuiVariant
  • ...
5516452
262}-
263uint QChar::toUpper(uint ucs4) noexcept-
264{-
265 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 2026370 times by 187 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • ...
)
0-2026370
266 return
never executed: return ucs4;
ucs4;
never executed: return ucs4;
0
267 return
executed 2026370 times by 187 tests: return convertCase_helper<QUnicodeTables::UppercaseTraits>(ucs4);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • ...
convertCase_helper<QUnicodeTables::UppercaseTraits>(ucs4);
executed 2026370 times by 187 tests: return convertCase_helper<QUnicodeTables::UppercaseTraits>(ucs4);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QChar
  • tst_QCheckBox
  • tst_QCollator
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDate
  • ...
2026370
268}-
269uint QChar::toTitleCase(uint ucs4) noexcept-
270{-
271 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 50 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_qmakelib
)
0-50
272 return
never executed: return ucs4;
ucs4;
never executed: return ucs4;
0
273 return
executed 50 times by 2 tests: return convertCase_helper<QUnicodeTables::TitlecaseTraits>(ucs4);
Executed by:
  • tst_QChar
  • tst_qmakelib
convertCase_helper<QUnicodeTables::TitlecaseTraits>(ucs4);
executed 50 times by 2 tests: return convertCase_helper<QUnicodeTables::TitlecaseTraits>(ucs4);
Executed by:
  • tst_QChar
  • tst_qmakelib
50
274}-
275-
276static inline uint foldCase(const ushort *ch, const ushort *start)-
277{-
278 uint ucs4 = *ch;-
279 if (QChar::isLowSurrogate(ucs4)
QChar::isLowSurrogate(ucs4)Description
TRUEnever evaluated
FALSEevaluated 46351 times by 25 tests
Evaluated by:
  • tst_Collections
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QRegExp
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTime
  • tst_qlogging - unknown status
&& ch > start
ch > startDescription
TRUEnever evaluated
FALSEnever evaluated
&& QChar::isHighSurrogate(*(ch - 1))
QChar::isHighS...ate(*(ch - 1))Description
TRUEnever evaluated
FALSEnever evaluated
)
0-46351
280 ucs4 = QChar::surrogateToUcs4(*(ch - 1), ucs4);
never executed: ucs4 = QChar::surrogateToUcs4(*(ch - 1), ucs4);
0
281 return
executed 46351 times by 25 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
Executed by:
  • tst_Collections
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QRegExp
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTime
  • tst_qlogging - unknown status
convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
executed 46351 times by 25 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
Executed by:
  • tst_Collections
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QFontMetrics
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QRegExp
  • tst_QSql
  • tst_QSqlDatabase
  • tst_QSqlDriver
  • tst_QSqlQuery
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QSqlThread
  • tst_QString
  • tst_QStringMatcher
  • tst_QStringRef
  • tst_QTextDocument
  • tst_QTextLayout
  • tst_QTime
  • tst_qlogging - unknown status
46351
282}-
283-
284static inline uint foldCase(uint ch, uint &last) noexcept-
285{-
286 uint ucs4 = ch;-
287 if (QChar::isLowSurrogate(ucs4)
QChar::isLowSurrogate(ucs4)Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringRef
FALSEevaluated 3463562 times by 170 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • ...
&& QChar::isHighSurrogate(last)
QChar::isHighSurrogate(last)Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_QString
  • tst_QStringRef
FALSEnever evaluated
)
0-3463562
288 ucs4 = QChar::surrogateToUcs4(last, ucs4);
executed 28 times by 2 tests: ucs4 = QChar::surrogateToUcs4(last, ucs4);
Executed by:
  • tst_QString
  • tst_QStringRef
28
289 last = ch;-
290 return
executed 3463590 times by 170 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • ...
convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
executed 3463590 times by 170 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDataWidgetMapper
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDialog
  • ...
3463590
291}-
292-
293static inline ushort foldCase(ushort ch) noexcept-
294{-
295 return
executed 151362 times by 53 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ch);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QComboBox
  • tst_QCssParser
  • tst_QDateTime
  • tst_QDialog
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkReply
  • tst_QOpenGlConfig
  • ...
convertCase_helper<QUnicodeTables::CasefoldTraits>(ch);
executed 151362 times by 53 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ch);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QApplication
  • tst_QComboBox
  • tst_QCssParser
  • tst_QDateTime
  • tst_QDialog
  • tst_QDockWidget
  • tst_QFileDialog2
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsView
  • tst_QGuiApplication
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMenu
  • tst_QMessageBox
  • tst_QNetworkReply
  • tst_QOpenGlConfig
  • ...
151362
296}-
297uint QChar::toCaseFolded(uint ucs4) noexcept-
298{-
299 if (ucs4 > LastValidCodePoint
ucs4 > LastValidCodePointDescription
TRUEnever evaluated
FALSEevaluated 65583 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QString
)
0-65583
300 return
never executed: return ucs4;
ucs4;
never executed: return ucs4;
0
301 return
executed 65583 times by 2 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
Executed by:
  • tst_QChar
  • tst_QString
convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
executed 65583 times by 2 tests: return convertCase_helper<QUnicodeTables::CasefoldTraits>(ucs4);
Executed by:
  • tst_QChar
  • tst_QString
65583
302}-
303QDataStream &operator<<(QDataStream &out, QChar chr)-
304{-
305 out << quint16(chr.unicode());-
306 return
executed 5 times by 2 tests: return out;
Executed by:
  • tst_QMetaType
  • tst_QVariant
out;
executed 5 times by 2 tests: return out;
Executed by:
  • tst_QMetaType
  • tst_QVariant
5
307}-
308QDataStream &operator>>(QDataStream &in, QChar &chr)-
309{-
310 quint16 u;-
311 in >> u;-
312 chr.unicode() = ushort(u);-
313 return
executed 9 times by 2 tests: return in;
Executed by:
  • tst_QMetaType
  • tst_QVariant
in;
executed 9 times by 2 tests: return in;
Executed by:
  • tst_QMetaType
  • tst_QVariant
9
314}-
315static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion version, int from)-
316{-
317 int length;-
318 int tag;-
319 unsigned short buffer[3];-
320-
321 QString &s = *str;-
322-
323 const unsigned short *utf16 = reinterpret_cast<unsigned short *>(s.data());-
324 const unsigned short *uc = utf16 + s.length();-
325 while (uc != utf16 + from
uc != utf16 + fromDescription
TRUEevaluated 597138 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 166051 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
) {
166051-597138
326 uint ucs4 = *(--uc);-
327 if (QChar(ucs4).isLowSurrogate()
QChar(ucs4).isLowSurrogate()Description
TRUEevaluated 13235 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 583903 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
&& uc != utf16
uc != utf16Description
TRUEevaluated 13235 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
) {
0-583903
328 ushort high = *(uc - 1);-
329 if (QChar(high).isHighSurrogate()
QChar(high).isHighSurrogate()Description
TRUEevaluated 13235 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
) {
0-13235
330 --uc;-
331 ucs4 = QChar::surrogateToUcs4(high, ucs4);-
332 }
executed 13235 times by 1 test: end of block
Executed by:
  • tst_QChar
13235
333 }
executed 13235 times by 1 test: end of block
Executed by:
  • tst_QChar
13235
334-
335 if (QChar::unicodeVersion(ucs4) > version
QChar::unicode...cs4) > versionDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 597137 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
)
1-597137
336 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_QChar
1
337-
338 const unsigned short *d = decompositionHelper(ucs4, &length, &tag, buffer);-
339 if (!d
!dDescription
TRUEevaluated 491040 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 106097 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
|| (canonical
canonicalDescription
TRUEevaluated 41350 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 64747 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
&& tag != QChar::Canonical
tag != QChar::CanonicalDescription
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 41304 times by 1 test
Evaluated by:
  • tst_QChar
))
46-491040
340 continue;
executed 491086 times by 3 tests: continue;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
491086
341-
342 int pos = uc - utf16;-
343 s.replace(pos, QChar::requiresSurrogates(ucs4) ? 2 : 1, reinterpret_cast<const QChar *>(d), length);-
344-
345 utf16 = reinterpret_cast<unsigned short *>(s.data());-
346 uc = utf16 + pos + length;-
347 }
executed 106051 times by 3 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
106051
348}
executed 166051 times by 3 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
166051
349-
350-
351struct UCS2Pair {-
352 ushort u1;-
353 ushort u2;-
354};-
355-
356inline bool operator<(const UCS2Pair &ligature1, const UCS2Pair &ligature2)-
357{ return
never executed: return ligature1.u1 < ligature2.u1;
ligature1.u1 < ligature2.u1;
never executed: return ligature1.u1 < ligature2.u1;
}
0
358inline bool operator<(ushort u1, const UCS2Pair &ligature)-
359{ return
never executed: return u1 < ligature.u1;
u1 < ligature.u1;
never executed: return u1 < ligature.u1;
}
0
360inline bool operator<(const UCS2Pair &ligature, ushort u1)-
361{ return
executed 60862 times by 2 tests: return ligature.u1 < u1;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
ligature.u1 < u1;
executed 60862 times by 2 tests: return ligature.u1 < u1;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
}
60862
362-
363struct UCS2SurrogatePair {-
364 UCS2Pair p1;-
365 UCS2Pair p2;-
366};-
367-
368inline bool operator<(const UCS2SurrogatePair &ligature1, const UCS2SurrogatePair &ligature2)-
369{ return
never executed: return QChar::surrogateToUcs4(ligature1.p1.u1, ligature1.p1.u2) < QChar::surrogateToUcs4(ligature2.p1.u1, ligature2.p1.u2);
QChar::surrogateToUcs4(ligature1.p1.u1, ligature1.p1.u2) < QChar::surrogateToUcs4(ligature2.p1.u1, ligature2.p1.u2);
never executed: return QChar::surrogateToUcs4(ligature1.p1.u1, ligature1.p1.u2) < QChar::surrogateToUcs4(ligature2.p1.u1, ligature2.p1.u2);
}
0
370inline bool operator<(uint u1, const UCS2SurrogatePair &ligature)-
371{ return
never executed: return u1 < QChar::surrogateToUcs4(ligature.p1.u1, ligature.p1.u2);
u1 < QChar::surrogateToUcs4(ligature.p1.u1, ligature.p1.u2);
never executed: return u1 < QChar::surrogateToUcs4(ligature.p1.u1, ligature.p1.u2);
}
0
372inline bool operator<(const UCS2SurrogatePair &ligature, uint u1)-
373{ return
executed 76 times by 1 test: return QChar::surrogateToUcs4(ligature.p1.u1, ligature.p1.u2) < u1;
Executed by:
  • tst_QChar
QChar::surrogateToUcs4(ligature.p1.u1, ligature.p1.u2) < u1;
executed 76 times by 1 test: return QChar::surrogateToUcs4(ligature.p1.u1, ligature.p1.u2) < u1;
Executed by:
  • tst_QChar
}
76
374-
375static uint inline ligatureHelper(uint u1, uint u2)-
376{-
377 if (u1 >= Hangul_LBase
u1 >= Hangul_LBaseDescription
TRUEevaluated 93226 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 41367 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
&& u1 <= Hangul_SBase + Hangul_SCount
u1 <= Hangul_S... Hangul_SCountDescription
TRUEevaluated 93062 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 164 times by 1 test
Evaluated by:
  • tst_QChar
) {
164-93226
378-
379-
380 const uint LIndex = u1 - Hangul_LBase;-
381 if (LIndex < Hangul_LCount
LIndex < Hangul_LCountDescription
TRUEevaluated 46152 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 46910 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
46152-46910
382 const uint VIndex = u2 - Hangul_VBase;-
383 if (VIndex < Hangul_VCount
VIndex < Hangul_VCountDescription
TRUEevaluated 45800 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 352 times by 1 test
Evaluated by:
  • tst_QChar
)
352-45800
384 return
executed 45800 times by 1 test: return Hangul_SBase + (LIndex * Hangul_VCount + VIndex) * Hangul_TCount;
Executed by:
  • tst_QChar
Hangul_SBase + (LIndex * Hangul_VCount + VIndex) * Hangul_TCount;
executed 45800 times by 1 test: return Hangul_SBase + (LIndex * Hangul_VCount + VIndex) * Hangul_TCount;
Executed by:
  • tst_QChar
45800
385 }
executed 352 times by 1 test: end of block
Executed by:
  • tst_QChar
352
386-
387 const uint SIndex = u1 - Hangul_SBase;-
388 if (SIndex < Hangul_SCount
SIndex < Hangul_SCountDescription
TRUEevaluated 44129 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 3133 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
&& (
(SIndex % Hangul_TCount) == 0Description
TRUEevaluated 44119 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QChar
SIndex % Hangul_TCount) == 0
(SIndex % Hangul_TCount) == 0Description
TRUEevaluated 44119 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QChar
) {
10-44129
389 const uint TIndex = u2 - Hangul_TBase;-
390 if (TIndex <= Hangul_TCount
TIndex <= Hangul_TCountDescription
TRUEevaluated 43102 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 1017 times by 1 test
Evaluated by:
  • tst_QChar
)
1017-43102
391 return
executed 43102 times by 1 test: return u1 + TIndex;
Executed by:
  • tst_QChar
u1 + TIndex;
executed 43102 times by 1 test: return u1 + TIndex;
Executed by:
  • tst_QChar
43102
392 }
executed 1017 times by 1 test: end of block
Executed by:
  • tst_QChar
1017
393 }
executed 4160 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
4160
394-
395 const unsigned short index = (u2 < 0x3100
u2 < 0x3100Description
TRUEevaluated 43175 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 2516 times by 1 test
Evaluated by:
  • tst_QChar
? (uc_ligature_trie[uc_ligature_trie[u2>>5] + (u2 & 0x1f)]) : (u2 < 0x12000
u2 < 0x12000Description
TRUEevaluated 1944 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 572 times by 1 test
Evaluated by:
  • tst_QChar
? uc_ligature_trie[uc_ligature_trie[((u2 - 0x3100)>>8) + 0x188] + (u2 & 0xff)] : 0xffff));
572-43175
396 if (index == 0xffff
index == 0xffffDescription
TRUEevaluated 33574 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 12117 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
)
12117-33574
397 return
executed 33574 times by 2 tests: return 0;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
0;
executed 33574 times by 2 tests: return 0;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
33574
398 const unsigned short *ligatures = uc_ligature_map+index;-
399 ushort length = *ligatures++;-
400 if (QChar::requiresSurrogates(u1)
QChar::requiresSurrogates(u1)Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 12069 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
48-12069
401 const UCS2SurrogatePair *data = reinterpret_cast<const UCS2SurrogatePair *>(ligatures);-
402 const UCS2SurrogatePair *r = std::lower_bound(data, data + length, u1);-
403 if (r != data + length
r != data + lengthDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
&& QChar::surrogateToUcs4(r->p1.u1, r->p1.u2) == u1
QChar::surroga...->p1.u2) == u1Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
)
0-48
404 return
executed 48 times by 1 test: return QChar::surrogateToUcs4(r->p2.u1, r->p2.u2);
Executed by:
  • tst_QChar
QChar::surrogateToUcs4(r->p2.u1, r->p2.u2);
executed 48 times by 1 test: return QChar::surrogateToUcs4(r->p2.u1, r->p2.u2);
Executed by:
  • tst_QChar
48
405 }
never executed: end of block
else {
0
406 const UCS2Pair *data = reinterpret_cast<const UCS2Pair *>(ligatures);-
407 const UCS2Pair *r = std::lower_bound(data, data + length, ushort(u1));-
408 if (r != data + length
r != data + lengthDescription
TRUEevaluated 12039 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_QChar
&& r->u1 == ushort(u1)
r->u1 == ushort(u1)Description
TRUEevaluated 8485 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 3554 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
)
30-12039
409 return
executed 8485 times by 2 tests: return r->u2;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
r->u2;
executed 8485 times by 2 tests: return r->u2;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
8485
410 }
executed 3584 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
3584
411-
412 return
executed 3584 times by 2 tests: return 0;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
0;
executed 3584 times by 2 tests: return 0;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
3584
413}-
414-
415static void composeHelper(QString *str, QChar::UnicodeVersion version, int from)-
416{-
417 QString &s = *str;-
418-
419 if (from < 0
from < 0Description
TRUEnever evaluated
FALSEevaluated 74383 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
|| s.length() - from < 2
s.length() - from < 2Description
TRUEevaluated 9562 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 64821 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
)
0-74383
420 return;
executed 9562 times by 3 tests: return;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
9562
421-
422 uint stcode = 0;-
423 int starter = -1;-
424 int next = -1;-
425 int lastCombining = 255;-
426-
427 int pos = from;-
428 while (pos < s.length()
pos < s.length()Description
TRUEevaluated 218622 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 64821 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
64821-218622
429 int i = pos;-
430 uint uc = s.at(pos).unicode();-
431 if (QChar(uc).isHighSurrogate()
QChar(uc).isHighSurrogate()Description
TRUEevaluated 2202 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 216420 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
&& pos < s.length()-1
pos < s.length()-1Description
TRUEevaluated 2202 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
) {
0-216420
432 ushort low = s.at(pos+1).unicode();-
433 if (QChar(low).isLowSurrogate()
QChar(low).isLowSurrogate()Description
TRUEevaluated 2202 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
) {
0-2202
434 uc = QChar::surrogateToUcs4(uc, low);-
435 ++pos;-
436 }
executed 2202 times by 1 test: end of block
Executed by:
  • tst_QChar
2202
437 }
executed 2202 times by 1 test: end of block
Executed by:
  • tst_QChar
2202
438-
439 const QUnicodeTables::Properties *p = qGetProp(uc);-
440 if (p->unicodeVersion > version
p->unicodeVersion > versionDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 218621 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
1-218621
441 starter = -1;-
442 next = -1;-
443 lastCombining = 255;-
444 ++pos;-
445 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_QChar
1
446 }-
447-
448 int combining = p->combiningClass;-
449 if ((i == next
i == nextDescription
TRUEevaluated 112382 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 106239 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
|| combining > lastCombining
combining > lastCombiningDescription
TRUEevaluated 22231 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 84008 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) && starter >= from
starter >= fromDescription
TRUEevaluated 134593 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_QChar
) {
20-134593
450-
451 uint ligature = ligatureHelper(stcode, uc);-
452 if (ligature
ligatureDescription
TRUEevaluated 97435 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 37158 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
37158-97435
453 stcode = ligature;-
454 QChar *d = s.data();-
455-
456 if (QChar::requiresSurrogates(ligature)
QChar::require...ates(ligature)Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 97387 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
48-97387
457 d[starter] = QChar::highSurrogate(ligature);-
458 d[starter + 1] = QChar::lowSurrogate(ligature);-
459 s.remove(i, 2);-
460 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_QChar
else {
48
461 d[starter] = ligature;-
462 s.remove(i, 1);-
463 }
executed 97387 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
97387
464 continue;
executed 97435 times by 2 tests: continue;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
97435
465 }-
466 }
executed 37158 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
37158
467 if (combining == 0
combining == 0Description
TRUEevaluated 81873 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 39313 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
39313-81873
468 starter = i;-
469 stcode = uc;-
470 next = pos + 1;-
471 }
executed 81873 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
81873
472 lastCombining = combining;-
473-
474 ++pos;-
475 }
executed 121186 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
121186
476}
executed 64821 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
64821
477-
478-
479static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, int from)-
480{-
481 QString &s = *str;-
482 const int l = s.length()-1;-
483-
484 uint u1, u2;-
485 ushort c1, c2;-
486-
487 int pos = from;-
488 while (pos < l
pos < lDescription
TRUEevaluated 174900 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 155015 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
) {
155015-174900
489 int p2 = pos+1;-
490 u1 = s.at(pos).unicode();-
491 if (QChar(u1).isHighSurrogate()
QChar(u1).isHighSurrogate()Description
TRUEevaluated 1554 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 173346 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
1554-173346
492 ushort low = s.at(p2).unicode();-
493 if (QChar(low).isLowSurrogate()
QChar(low).isLowSurrogate()Description
TRUEevaluated 1554 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
) {
0-1554
494 u1 = QChar::surrogateToUcs4(u1, low);-
495 if (p2 >= l
p2 >= lDescription
TRUEevaluated 448 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 1106 times by 1 test
Evaluated by:
  • tst_QChar
)
448-1106
496 break;
executed 448 times by 1 test: break;
Executed by:
  • tst_QChar
448
497 ++p2;-
498 }
executed 1106 times by 1 test: end of block
Executed by:
  • tst_QChar
1106
499 }
executed 1106 times by 1 test: end of block
Executed by:
  • tst_QChar
1106
500 c1 = 0;-
501-
502 advance:
code before this statement executed 174452 times by 2 tests: advance:
Executed by:
  • tst_QChar
  • tst_QUrlInternal
174452
503 u2 = s.at(p2).unicode();-
504 if (QChar(u2).isHighSurrogate()
QChar(u2).isHighSurrogate()Description
TRUEevaluated 3518 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 259567 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
&& p2 < l
p2 < lDescription
TRUEevaluated 3518 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
) {
0-259567
505 ushort low = s.at(p2+1).unicode();-
506 if (QChar(low).isLowSurrogate()
QChar(low).isLowSurrogate()Description
TRUEevaluated 3518 times by 1 test
Evaluated by:
  • tst_QChar
FALSEnever evaluated
) {
0-3518
507 u2 = QChar::surrogateToUcs4(u2, low);-
508 ++p2;-
509 }
executed 3518 times by 1 test: end of block
Executed by:
  • tst_QChar
3518
510 }
executed 3518 times by 1 test: end of block
Executed by:
  • tst_QChar
3518
511-
512 c2 = 0;-
513 {-
514 const QUnicodeTables::Properties *p = qGetProp(u2);-
515 if (p->unicodeVersion <= version
p->unicodeVersion <= versionDescription
TRUEevaluated 263085 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEnever evaluated
)
0-263085
516 c2 = p->combiningClass;
executed 263085 times by 2 tests: c2 = p->combiningClass;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
263085
517 }-
518 if (c2 == 0
c2 == 0Description
TRUEevaluated 138452 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 124633 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
124633-138452
519 pos = p2+1;-
520 continue;
executed 138452 times by 2 tests: continue;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
138452
521 }-
522-
523 if (c1 == 0
c1 == 0Description
TRUEevaluated 52188 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 72445 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
52188-72445
524 const QUnicodeTables::Properties *p = qGetProp(u1);-
525 if (p->unicodeVersion <= version
p->unicodeVersion <= versionDescription
TRUEevaluated 52187 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QChar
)
1-52187
526 c1 = p->combiningClass;
executed 52187 times by 2 tests: c1 = p->combiningClass;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
52187
527 }
executed 52188 times by 2 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrlInternal
52188
528-
529 if (c1 > c2
c1 > c2Description
TRUEevaluated 25412 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 99221 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
) {
25412-99221
530 QChar *uc = s.data();-
531 int p = pos;-
532-
533 if (!QChar::requiresSurrogates(u2)
!QChar::requiresSurrogates(u2)Description
TRUEevaluated 24896 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 516 times by 1 test
Evaluated by:
  • tst_QChar
) {
516-24896
534 uc[p++] = u2;-
535 }
executed 24896 times by 1 test: end of block
Executed by:
  • tst_QChar
else {
24896
536 uc[p++] = QChar::highSurrogate(u2);-
537 uc[p++] = QChar::lowSurrogate(u2);-
538 }
executed 516 times by 1 test: end of block
Executed by:
  • tst_QChar
516
539 if (!QChar::requiresSurrogates(u1)
!QChar::requiresSurrogates(u1)Description
TRUEevaluated 24980 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 432 times by 1 test
Evaluated by:
  • tst_QChar
) {
432-24980
540 uc[p++] = u1;-
541 }
executed 24980 times by 1 test: end of block
Executed by:
  • tst_QChar
else {
24980
542 uc[p++] = QChar::highSurrogate(u1);-
543 uc[p++] = QChar::lowSurrogate(u1);-
544 }
executed 432 times by 1 test: end of block
Executed by:
  • tst_QChar
432
545 if (pos > 0
pos > 0Description
TRUEevaluated 25400 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QChar
)
12-25400
546 --
executed 25400 times by 1 test: --pos;
Executed by:
  • tst_QChar
pos;
executed 25400 times by 1 test: --pos;
Executed by:
  • tst_QChar
25400
547 if (pos > 0
pos > 0Description
TRUEevaluated 14708 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 10704 times by 1 test
Evaluated by:
  • tst_QChar
&& s.at(pos).isLowSurrogate()
s.at(pos).isLowSurrogate()Description
TRUEevaluated 844 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 13864 times by 1 test
Evaluated by:
  • tst_QChar
)
844-14708
548 --
executed 844 times by 1 test: --pos;
Executed by:
  • tst_QChar
pos;
executed 844 times by 1 test: --pos;
Executed by:
  • tst_QChar
844
549 }
executed 25412 times by 1 test: end of block
Executed by:
  • tst_QChar
else {
25412
550 ++pos;-
551 if (QChar::requiresSurrogates(u1)
QChar::requiresSurrogates(u1)Description
TRUEevaluated 3308 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 95913 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
)
3308-95913
552 ++
executed 3308 times by 1 test: ++pos;
Executed by:
  • tst_QChar
pos;
executed 3308 times by 1 test: ++pos;
Executed by:
  • tst_QChar
3308
553-
554 u1 = u2;-
555 c1 = c2;-
556 p2 = pos + 1;-
557 if (QChar::requiresSurrogates(u1)
QChar::requiresSurrogates(u1)Description
TRUEevaluated 2822 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 96399 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
)
2822-96399
558 ++
executed 2822 times by 1 test: ++p2;
Executed by:
  • tst_QChar
p2;
executed 2822 times by 1 test: ++p2;
Executed by:
  • tst_QChar
2822
559 if (p2 > l
p2 > lDescription
TRUEevaluated 10588 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
FALSEevaluated 88633 times by 2 tests
Evaluated by:
  • tst_QChar
  • tst_QUrlInternal
)
10588-88633
560 break;
executed 10588 times by 2 tests: break;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
10588
561-
562 goto
executed 88633 times by 2 tests: goto advance;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
advance;
executed 88633 times by 2 tests: goto advance;
Executed by:
  • tst_QChar
  • tst_QUrlInternal
88633
563 }-
564 }-
565}
executed 166051 times by 3 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
166051
566-
567-
568-
569static bool normalizationQuickCheckHelper(QString *str, QString::NormalizationForm mode, int from, int *lastStable)-
570{-
571 static_assert(bool(QString::NormalizationForm_D == 0), "QString::NormalizationForm_D == 0");-
572 static_assert(bool(QString::NormalizationForm_C == 1), "QString::NormalizationForm_C == 1");-
573 static_assert(bool(QString::NormalizationForm_KD == 2), "QString::NormalizationForm_KD == 2");-
574 static_assert(bool(QString::NormalizationForm_KC == 3), "QString::NormalizationForm_KC == 3");-
575-
576 enum { NFQC_YES = 0, NFQC_NO = 1, NFQC_MAYBE = 3 };-
577-
578 const ushort *string = reinterpret_cast<const ushort *>(str->constData());-
579 int length = str->length();-
580-
581-
582 while (length > from
length > fromDescription
TRUEevaluated 566027 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QUrl
&& QChar::isHighSurrogate(string[length - 1])
QChar::isHighS...g[length - 1])Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QUrl
FALSEevaluated 566026 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
)
1-566027
583 --
executed 1 time by 1 test: --length;
Executed by:
  • tst_QUrl
length;
executed 1 time by 1 test: --length;
Executed by:
  • tst_QUrl
1
584-
585 uchar lastCombining = 0;-
586 for (int i = from; i < length
i < lengthDescription
TRUEevaluated 1037340 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 399976 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
; ++i) {
399976-1037340
587 int pos = i;-
588 uint uc = string[i];-
589 if (uc < 0x80
uc < 0x80Description
TRUEevaluated 49201 times by 6 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QNetworkCookie
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 988139 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
) {
49201-988139
590-
591 lastCombining = 0;-
592 *lastStable = pos;-
593 continue;
executed 49201 times by 6 tests: continue;
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QNetworkCookie
  • tst_QUrl
  • tst_QUrlInternal
49201
594 }-
595-
596 if (QChar::isHighSurrogate(uc)
QChar::isHighSurrogate(uc)Description
TRUEevaluated 23838 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 964301 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
) {
23838-964301
597 ushort low = string[i + 1];-
598 if (!QChar::isLowSurrogate(low)
!QChar::isLowSurrogate(low)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QUrl
FALSEevaluated 23837 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
) {
1-23837
599-
600 lastCombining = 0;-
601 *lastStable = pos;-
602 continue;
executed 1 time by 1 test: continue;
Executed by:
  • tst_QUrl
1
603 }-
604 ++i;-
605 uc = QChar::surrogateToUcs4(uc, low);-
606 }
executed 23837 times by 3 tests: end of block
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
23837
607-
608 const QUnicodeTables::Properties *p = qGetProp(uc);-
609-
610 if (p->combiningClass < lastCombining
p->combiningCl... lastCombiningDescription
TRUEevaluated 8428 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 979710 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
&& p->combiningClass > 0
p->combiningClass > 0Description
TRUEevaluated 5682 times by 1 test
Evaluated by:
  • tst_QChar
FALSEevaluated 2746 times by 1 test
Evaluated by:
  • tst_QChar
)
2746-979710
611 return
executed 5682 times by 1 test: return false;
Executed by:
  • tst_QChar
false;
executed 5682 times by 1 test: return false;
Executed by:
  • tst_QChar
5682
612-
613 const uchar check = (p->nfQuickCheck >> (mode << 1)) & 0x03;-
614 if (check != NFQC_YES
check != NFQC_YESDescription
TRUEevaluated 160369 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 822087 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
)
160369-822087
615 return
executed 160369 times by 3 tests: return false;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
false;
executed 160369 times by 3 tests: return false;
Executed by:
  • tst_QChar
  • tst_QUrl
  • tst_QUrlInternal
160369
616-
617 lastCombining = p->combiningClass;-
618 if (lastCombining == 0
lastCombining == 0Description
TRUEevaluated 734299 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
FALSEevaluated 87788 times by 3 tests
Evaluated by:
  • tst_QChar
  • tst_QLabel
  • tst_QTextLayout
)
87788-734299
619 *
executed 734299 times by 9 tests: *lastStable = pos;
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
lastStable = pos;
executed 734299 times by 9 tests: *lastStable = pos;
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
734299
620 }
executed 822087 times by 9 tests: end of block
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
822087
621-
622 if (length != str->length()
length != str->length()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QUrl
FALSEevaluated 399975 times by 9 tests
Evaluated by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
)
1-399975
623 *
executed 1 time by 1 test: *lastStable = str->length() - 1;
Executed by:
  • tst_QUrl
lastStable = str->length() - 1;
executed 1 time by 1 test: *lastStable = str->length() - 1;
Executed by:
  • tst_QUrl
1
624-
625 return
executed 399976 times by 9 tests: return true;
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
true;
executed 399976 times by 9 tests: return true;
Executed by:
  • tst_QChar
  • tst_QDnsLookup
  • tst_QHostInfo
  • tst_QLabel
  • tst_QNetworkCookie
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QUrl
  • tst_QUrlInternal
399976
626}-
627-
628-
Switch to Source codePreprocessed file

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