OpenCoverage

qv4stringobject.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4stringobject.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
15using namespace QV4;-
16-
17const QV4::VTable StringObject::static_vtbl = { (std::is_same<StringObject::SuperClass, Object>::value) ? nullptr : &StringObject::SuperClass::static_vtbl, (sizeof(StringObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(StringObject::Data) + (StringObject::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(StringObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), StringObject::IsExecutionContext, StringObject::IsString, StringObject::IsObject, StringObject::IsFunctionObject, StringObject::IsErrorObject, StringObject::IsArrayData, StringObject::IsStringOrSymbol, StringObject::MyType, { 0, 0, 0, 0 }, "StringObject", StringObject::virtualDestroy, StringObject::Data::markObjects, StringObject::virtualIsEqualTo, StringObject::virtualGet, StringObject::virtualPut, StringObject::virtualDeleteProperty, StringObject::virtualHasProperty, StringObject::virtualGetOwnProperty, StringObject::virtualDefineOwnProperty, StringObject::virtualIsExtensible, StringObject::virtualPreventExtensions, StringObject::virtualGetPrototypeOf, StringObject::virtualSetPrototypeOf, StringObject::virtualGetLength, StringObject::virtualAdvanceIterator, StringObject::virtualInstanceOf, StringObject::virtualCall, StringObject::virtualCallAsConstructor, };-
18-
19void Heap::StringObject::init()-
20{-
21 Object::init();-
22 ((vtable() == QV4::StringObject::staticVTable()) ? static_cast<void>(0) : qt_assert("vtable() == QV4::StringObject::staticVTable()", __FILE__, 75));-
23 string.set(internalClass->engine, internalClass->engine->id_empty()->d());-
24 setProperty(internalClass->engine, LengthPropertyIndex, Primitive::fromInt32(0));-
25}
never executed: end of block
0
26-
27void Heap::StringObject::init(const QV4::String *str)-
28{-
29 Object::init();-
30 string.set(internalClass->engine, str->d());-
31 setProperty(internalClass->engine, LengthPropertyIndex, Primitive::fromInt32(length()));-
32}
executed 48304 times by 14 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
48304
33-
34Heap::String *Heap::StringObject::getIndex(uint index) const-
35{-
36 QString str = string->toQString();-
37 if (index >= (uint)str.length()
index >= (uint)str.length()Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 1076 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
)
28-1076
38 return
executed 28 times by 2 tests: return nullptr;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
nullptr;
executed 28 times by 2 tests: return nullptr;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
28
39 return
executed 1076 times by 4 tests: return internalClass->engine->newString(str.mid(index, 1));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
internalClass->engine->newString(str.mid(index, 1));
executed 1076 times by 4 tests: return internalClass->engine->newString(str.mid(index, 1));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
1076
40}-
41-
42uint Heap::StringObject::length() const-
43{-
44 return
executed 48934 times by 14 tests: return string->length();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
string->length();
executed 48934 times by 14 tests: return string->length();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllocale
  • tst_qqmltranslation
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
  • tst_testfiltering
48934
45}-
46-
47bool StringObject::virtualDeleteProperty(Managed *m, PropertyKey id)-
48{-
49 ((m->as<StringObject>()) ? static_cast<void>(0) : qt_assert("m->as<StringObject>()", __FILE__, 102));-
50 if (id.isArrayIndex()
id.isArrayIndex()Description
TRUEevaluated 28 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 86 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
) {
28-86
51 StringObject *o = static_cast<StringObject *>(m);-
52 uint index = id.asArrayIndex();-
53 if (index < static_cast<uint>(o->d()->string->toQString().length())
index < static...ng().length())Description
TRUEevaluated 26 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qjsengine
)
2-26
54 return
executed 26 times by 2 tests: return false;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
false;
executed 26 times by 2 tests: return false;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
26
55 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qjsengine
2
56 return
executed 88 times by 2 tests: return Object::virtualDeleteProperty(m, id);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
Object::virtualDeleteProperty(m, id);
executed 88 times by 2 tests: return Object::virtualDeleteProperty(m, id);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
88
57}-
58-
59void StringObject::virtualAdvanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs)-
60{-
61 name->setM(nullptr);-
62 StringObject *s = static_cast<StringObject *>(m);-
63 uint slen = s->d()->string->toQString().length();-
64 if (it->arrayIndex <= slen
it->arrayIndex <= slenDescription
TRUEevaluated 577 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
28-577
65 while (it->arrayIndex < slen
it->arrayIndex < slenDescription
TRUEevaluated 322 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
FALSEevaluated 256 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
) {
256-322
66 *index = it->arrayIndex;-
67 ++it->arrayIndex;-
68 Property pd;-
69 PropertyAttributes a = s->getOwnProperty(PropertyKey::fromArrayIndex(*index), &pd);-
70 if (!(it->flags & ObjectIterator::EnumerableOnly)
!(it->flags & ...numerableOnly)Description
TRUEevaluated 148 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalueiterator
FALSEevaluated 174 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
|| a.isEnumerable()
a.isEnumerable()Description
TRUEevaluated 174 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
FALSEnever evaluated
) {
0-174
71 *attrs = a;-
72 p->copy(&pd, a);-
73 return;
executed 322 times by 4 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
322
74 }-
75 }
never executed: end of block
0
76 if (s->arrayData()
s->arrayData()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 244 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
) {
12-244
77 it->arrayNode = s->sparseBegin();-
78-
79 while (it->arrayNode
it->arrayNodeDescription
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& it->arrayNode->key() < slen
it->arrayNode->key() < slenDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-12
80 it->arrayNode = it->arrayNode->nextNode();
never executed: it->arrayNode = it->arrayNode->nextNode();
0
81 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
12
82 }
executed 256 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
256
83-
84 return
executed 284 times by 4 tests: return Object::virtualAdvanceIterator(m, it, name, index, p, attrs);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
Object::virtualAdvanceIterator(m, it, name, index, p, attrs);
executed 284 times by 4 tests: return Object::virtualAdvanceIterator(m, it, name, index, p, attrs);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
284
85}-
86-
87PropertyAttributes StringObject::virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p)-
88{-
89 PropertyAttributes attributes = Object::virtualGetOwnProperty(m, id, p);-
90 if (attributes != Attr_Invalid
attributes != Attr_InvalidDescription
TRUEevaluated 510 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1548 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
)
510-1548
91 return
executed 510 times by 1 test: return attributes;
Executed by:
  • tst_ecmascripttests
attributes;
executed 510 times by 1 test: return attributes;
Executed by:
  • tst_ecmascripttests
510
92-
93 Object *o = static_cast<Object *>(m);-
94 if (id.isArrayIndex()
id.isArrayIndex()Description
TRUEevaluated 542 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
FALSEevaluated 1006 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
) {
542-1006
95 uint index = id.asArrayIndex();-
96 if (o->isStringObject()
o->isStringObject()Description
TRUEevaluated 542 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
FALSEnever evaluated
) {
0-542
97 if (index >= static_cast<const StringObject *>(m)->length()
index >= stati...>(m)->length()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 530 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
)
12-530
98 return
executed 12 times by 1 test: return Attr_Invalid;
Executed by:
  • tst_ecmascripttests
Attr_Invalid;
executed 12 times by 1 test: return Attr_Invalid;
Executed by:
  • tst_ecmascripttests
12
99 if (p
pDescription
TRUEevaluated 438 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
FALSEevaluated 92 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
92-438
100 p->value = static_cast<StringObject *>(o)->getIndex(index);
executed 438 times by 4 tests: p->value = static_cast<StringObject *>(o)->getIndex(index);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
438
101 return
executed 530 times by 4 tests: return Attr_NotConfigurable|Attr_NotWritable;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
Attr_NotConfigurable|Attr_NotWritable;
executed 530 times by 4 tests: return Attr_NotConfigurable|Attr_NotWritable;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
530
102 }-
103 }
never executed: end of block
0
104 return
executed 1006 times by 2 tests: return Attr_Invalid;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
Attr_Invalid;
executed 1006 times by 2 tests: return Attr_Invalid;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
1006
105}-
106-
107const QV4::VTable StringCtor::static_vtbl = { (std::is_same<StringCtor::SuperClass, Object>::value) ? nullptr : &StringCtor::SuperClass::static_vtbl, (sizeof(StringCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(StringCtor::Data) + (StringCtor::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(StringCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), StringCtor::IsExecutionContext, StringCtor::IsString, StringCtor::IsObject, StringCtor::IsFunctionObject, StringCtor::IsErrorObject, StringCtor::IsArrayData, StringCtor::IsStringOrSymbol, StringCtor::MyType, { 0, 0, 0, 0 }, "StringCtor", StringCtor::virtualDestroy, StringCtor::Data::markObjects, StringCtor::virtualIsEqualTo, StringCtor::virtualGet, StringCtor::virtualPut, StringCtor::virtualDeleteProperty, StringCtor::virtualHasProperty, StringCtor::virtualGetOwnProperty, StringCtor::virtualDefineOwnProperty, StringCtor::virtualIsExtensible, StringCtor::virtualPreventExtensions, StringCtor::virtualGetPrototypeOf, StringCtor::virtualSetPrototypeOf, StringCtor::virtualGetLength, StringCtor::virtualAdvanceIterator, StringCtor::virtualInstanceOf, StringCtor::virtualCall, StringCtor::virtualCallAsConstructor, };-
108-
109void Heap::StringCtor::init(QV4::ExecutionContext *scope)-
110{-
111 Heap::FunctionObject::init(scope, ([]() noexcept -> QString { enum { Size = sizeof(u"" "String")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "String" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98740 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98740 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()));
98740
112}
executed 99086 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
99086
113-
114ReturnedValue StringCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *)-
115{-
116 ExecutionEngine *v4 = static_cast<const Object *>(f)->engine();-
117 Scope scope(v4);-
118 ScopedString value(scope);-
119 if (argc
argcDescription
TRUEevaluated 3214 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
FALSEevaluated 256 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
256-3214
120 value = argv[0].toString(v4);
executed 3215 times by 5 tests: value = argv[0].toString(v4);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
3215
121 else-
122 value = v4->newString();
executed 256 times by 1 test: value = v4->newString();
Executed by:
  • tst_ecmascripttests
256
123 do { if (scope.hasException()
scope.hasException()Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3468 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
) { return
executed 11 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 11 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
} } while (false);
11-3468
124 return
executed 3467 times by 5 tests: return Encode(v4->newStringObject(value));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
Encode(v4->newStringObject(value));
executed 3467 times by 5 tests: return Encode(v4->newStringObject(value));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qqmlecmascript
3467
125}-
126-
127ReturnedValue StringCtor::virtualCall(const FunctionObject *m, const Value *, const Value *argv, int argc)-
128{-
129 ExecutionEngine *v4 = m->engine();-
130 if (!argc
!argcDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 616874 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-616874
131 return
executed 4 times by 1 test: return v4->newString()->asReturnedValue();
Executed by:
  • tst_ecmascripttests
v4->newString()->asReturnedValue();
executed 4 times by 1 test: return v4->newString()->asReturnedValue();
Executed by:
  • tst_ecmascripttests
4
132 if (argv[0].isSymbol()
argv[0].isSymbol()Description
TRUEevaluated 500 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 616418 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
500-616418
133 return
executed 500 times by 1 test: return v4->newString(argv[0].symbolValue()->descriptiveString())->asReturnedValue();
Executed by:
  • tst_ecmascripttests
v4->newString(argv[0].symbolValue()->descriptiveString())->asReturnedValue();
executed 500 times by 1 test: return v4->newString(argv[0].symbolValue()->descriptiveString())->asReturnedValue();
Executed by:
  • tst_ecmascripttests
500
134 return
executed 616377 times by 1 test: return argv[0].toString(v4)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
argv[0].toString(v4)->asReturnedValue();
executed 616377 times by 1 test: return argv[0].toString(v4)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
616377
135}-
136-
137ReturnedValue StringCtor::method_fromCharCode(const FunctionObject *b, const Value *, const Value *argv, int argc)-
138{-
139 QString str(argc, Qt::Uninitialized);-
140 QChar *ch = str.data();-
141 for (int i = 0, ei = argc; i < ei
i < eiDescription
TRUEevaluated 28032727 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
FALSEevaluated 17044476 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
; ++i) {
17044476-28032727
142 *ch = QChar(argv[i].toUInt16());-
143 ++ch;-
144 }
executed 28025947 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
28025947
145 *ch = 0;-
146 return
executed 17068719 times by 2 tests: return Encode(b->engine()->newString(str));
Executed by:
  • tst_ecmascripttests
  • tst_examples
Encode(b->engine()->newString(str));
executed 17068719 times by 2 tests: return Encode(b->engine()->newString(str));
Executed by:
  • tst_ecmascripttests
  • tst_examples
17068719
147}-
148-
149-
150-
151ReturnedValue StringCtor::method_fromCodePoint(const FunctionObject *f, const Value *, const Value *argv, int argc)-
152{-
153 ExecutionEngine *e = f->engine();-
154 QString result(argc*2, Qt::Uninitialized);-
155 QChar *ch = result.data();-
156 for (int i = 0; i < argc
i < argcDescription
TRUEevaluated 140 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 59 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i) {
59-140
157 double num = argv[i].toNumber();-
158 if (e->hasException
e->hasExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-124
159 return
executed 16 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 16 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
16
160 int cp = static_cast<int>(num);-
161 if (cp != num
cp != numDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 95 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| cp < 0
cp < 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 87 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| cp > 0x10ffff
cp > 0x10ffffDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 83 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-95
162 return
executed 40 times by 1 test: return e->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "String.fromCodePoint: argument out of range.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "String.fromCodePoint: argument out of range." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
e->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "String.fromCodePoint: argument out of range.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "String.fromCodePoint: argument out of range." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 40 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
qstring_literal_temp;
executed 40 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_ecmascripttests
}()));
executed 40 times by 1 test: return e->throwRangeError(([]() noexcept -> QString { enum { Size = sizeof(u"" "String.fromCodePoint: argument out of range.")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "String.fromCodePoint: argument out of range." }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_ecmascripttests
40
163 if (cp > 0xffff
cp > 0xffffDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 63 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
20-63
164 *ch = QChar::highSurrogate(cp);-
165 ++ch;-
166 *ch = QChar::lowSurrogate(cp);-
167 }
executed 20 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
20
168 *ch = cp;-
169 }
executed 63 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
63
170 ++ch;-
171 }
executed 83 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
83
172 *ch = 0;-
173 result.truncate(ch - result.constData());-
174 return
executed 60 times by 1 test: return e->newString(result)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
e->newString(result)->asReturnedValue();
executed 60 times by 1 test: return e->newString(result)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
60
175}-
176-
177void StringPrototype::init(ExecutionEngine *engine, Object *ctor)-
178{-
179 Scope scope(engine);-
180 ScopedObject o(scope);-
181-
182-
183 Heap::InternalClass *ic = scope.engine->classes[ExecutionEngine::Class_StringObject]->changePrototype(scope.engine->objectPrototype()->d());-
184 d()->internalClass.set(scope.engine, ic);-
185 d()->string.set(scope.engine, scope.engine->id_empty()->d());-
186 setProperty(scope.engine, Heap::StringObject::LengthPropertyIndex, Primitive::fromInt32(0));-
187-
188 ctor->defineReadonlyProperty(engine->id_prototype(), (o = this));-
189 ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(1));-
190 ctor->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fromCharCode")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fromCharCode" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98391 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98391 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), StringCtor::method_fromCharCode, 1);
98391
191 ctor->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fromCodePoint")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fromCodePoint" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98846 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98846 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), StringCtor::method_fromCodePoint, 1);
98846
192-
193 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "constructor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "constructor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98866 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98866 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), (o = ctor));
98866
194 defineDefaultProperty(engine->id_toString(), method_toString);-
195 defineDefaultProperty(engine->id_valueOf(), method_toString);-
196 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "charAt")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "charAt" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99063 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99063 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_charAt, 1);
99063
197 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "charCodeAt")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "charCodeAt" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98363 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98363 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_charCodeAt, 1);
98363
198 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "codePointAt")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "codePointAt" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99090 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99090 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_codePointAt, 1);
99090
199 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "concat")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "concat" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98876 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98876 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_concat, 1);
98876
200 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "endsWith")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "endsWith" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99076 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99076 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_endsWith, 1);
99076
201 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "indexOf")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "indexOf" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99056 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99056 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_indexOf, 1);
99056
202 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "includes")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "includes" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99079 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99079 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_includes, 1);
99079
203 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "lastIndexOf")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "lastIndexOf" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98838 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98838 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_lastIndexOf, 1);
98838
204 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "localeCompare")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "localeCompare" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99101 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99101 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_localeCompare, 1);
99101
205 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "match")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "match" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98810 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98810 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_match, 1);
98810
206 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "normalize")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "normalize" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99086 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99086 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_normalize, 0);
99086
207 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "padEnd")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "padEnd" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98854 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98854 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_padEnd, 1);
98854
208 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "padStart")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "padStart" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98945 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98945 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_padStart, 1);
98945
209 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "repeat")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "repeat" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99080 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99080 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_repeat, 1);
99080
210 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "replace")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "replace" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99113 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99113 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_replace, 2);
99113
211 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "search")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "search" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98910 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98910 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_search, 1);
98910
212 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "slice")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "slice" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99088 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99088 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_slice, 2);
99088
213 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "split")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "split" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98825 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98825 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_split, 2);
98825
214 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "startsWith")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "startsWith" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98899 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98899 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_startsWith, 1);
98899
215 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "substr")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "substr" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98912 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98912 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_substr, 2);
98912
216 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "substring")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "substring" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99119 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99119 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_substring, 2);
99119
217 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLowerCase")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLowerCase" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99059 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99059 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_toLowerCase);
99059
218 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLocaleLowerCase")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLocaleLowerCase" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99088 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99088 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_toLocaleLowerCase);
99088
219 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toUpperCase")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toUpperCase" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98846 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98846 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_toUpperCase);
98846
220 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toLocaleUpperCase")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toLocaleUpperCase" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 99108 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 99108 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_toLocaleUpperCase);
99108
221 defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "trim")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "trim" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 98817 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
qstring_literal_temp;
executed 98817 times by 153 tests: return qstring_literal_temp;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}()), method_trim);
98817
222 defineDefaultProperty(engine->symbol_iterator(), method_iterator);-
223}
executed 98662 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
98662
224-
225static Heap::String *thisAsString(ExecutionEngine *v4, const QV4::Value *thisObject)-
226{-
227 if (String *s = thisObject->stringValue()
String *s = th...>stringValue()Description
TRUEevaluated 359 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
112-359
228 return
executed 359 times by 1 test: return s->d();
Executed by:
  • tst_ecmascripttests
s->d();
executed 359 times by 1 test: return s->d();
Executed by:
  • tst_ecmascripttests
359
229 if (const
const StringOb...tringObject>()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
StringObject *thisString = thisObject->as<StringObject>()
const StringOb...tringObject>()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
48-64
230 return
executed 48 times by 1 test: return thisString->d()->string;
Executed by:
  • tst_ecmascripttests
thisString->d()->string;
executed 48 times by 1 test: return thisString->d()->string;
Executed by:
  • tst_ecmascripttests
48
231 return
executed 64 times by 1 test: return thisObject->toString(v4);
Executed by:
  • tst_ecmascripttests
thisObject->toString(v4);
executed 64 times by 1 test: return thisObject->toString(v4);
Executed by:
  • tst_ecmascripttests
64
232}-
233-
234static QString getThisString(ExecutionEngine *v4, const QV4::Value *thisObject)-
235{-
236 if (String *s = thisObject->stringValue()
String *s = th...>stringValue()Description
TRUEevaluated 570539 times by 10 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
FALSEevaluated 3682 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
3682-570539
237 return
executed 570589 times by 10 tests: return s->toQString();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
s->toQString();
executed 570589 times by 10 tests: return s->toQString();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_signalspy
  • tst_testfiltering
570589
238 if (const
const StringOb...tringObject>()Description
TRUEevaluated 2844 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 837 times by 1 test
Evaluated by:
  • tst_ecmascripttests
StringObject *thisString = thisObject->as<StringObject>()
const StringOb...tringObject>()Description
TRUEevaluated 2844 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 837 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
837-2844
239 return
executed 2843 times by 1 test: return thisString->d()->string->toQString();
Executed by:
  • tst_ecmascripttests
thisString->d()->string->toQString();
executed 2843 times by 1 test: return thisString->d()->string->toQString();
Executed by:
  • tst_ecmascripttests
2843
240 if (thisObject->isUndefined()
thisObject->isUndefined()Description
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 760 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| thisObject->isNull()
thisObject->isNull()Description
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 681 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
80-760
241 v4->throwTypeError();-
242 return
executed 159 times by 1 test: return QString();
Executed by:
  • tst_ecmascripttests
QString();
executed 159 times by 1 test: return QString();
Executed by:
  • tst_ecmascripttests
159
243 }-
244 return
executed 680 times by 1 test: return thisObject->toQString();
Executed by:
  • tst_ecmascripttests
thisObject->toQString();
executed 680 times by 1 test: return thisObject->toQString();
Executed by:
  • tst_ecmascripttests
680
245}-
246-
247ReturnedValue StringPrototype::method_toString(const FunctionObject *b, const Value *thisObject, const Value *, int)-
248{-
249 if (thisObject->isString()
thisObject->isString()Description
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
FALSEevaluated 2271 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
)
66-2271
250 return
executed 66 times by 2 tests: return thisObject->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
thisObject->asReturnedValue();
executed 66 times by 2 tests: return thisObject->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
66
251-
252 ExecutionEngine *v4 = b->engine();-
253 const StringObject *o = thisObject->as<StringObject>();-
254 if (!o
!oDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2256 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsvalue
)
16-2256
255 return
executed 16 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 16 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
16
256 return
executed 2255 times by 2 tests: return o->d()->string->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
o->d()->string->asReturnedValue();
executed 2255 times by 2 tests: return o->d()->string->asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qjsvalue
2255
257}-
258-
259ReturnedValue StringPrototype::method_charAt(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
260{-
261 ExecutionEngine *v4 = b->engine();-
262 const QString str = getThisString(v4, thisObject);-
263 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 316 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
12-316
264 return
executed 12 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 12 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
12
265-
266 int pos = 0;-
267 if (argc > 0
argc > 0Description
TRUEevaluated 312 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-312
268 pos = (int) argv[0].toInteger();
executed 312 times by 1 test: pos = (int) argv[0].toInteger();
Executed by:
  • tst_ecmascripttests
312
269-
270 QString result;-
271 if (pos >= 0
pos >= 0Description
TRUEevaluated 304 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& pos < str.length()
pos < str.length()Description
TRUEevaluated 288 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
12-304
272 result += str.at(pos);
executed 288 times by 1 test: result += str.at(pos);
Executed by:
  • tst_ecmascripttests
288
273-
274 return
executed 316 times by 1 test: return Encode(v4->newString(result));
Executed by:
  • tst_ecmascripttests
Encode(v4->newString(result));
executed 316 times by 1 test: return Encode(v4->newString(result));
Executed by:
  • tst_ecmascripttests
316
275}-
276-
277ReturnedValue StringPrototype::method_charCodeAt(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
278{-
279 ExecutionEngine *v4 = b->engine();-
280 const QString str = getThisString(v4, thisObject);-
281 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 306 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickaccessible
)
12-306
282 return
executed 12 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 12 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
12
283-
284 int pos = 0;-
285 if (argc > 0
argc > 0Description
TRUEevaluated 302 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickaccessible
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-302
286 pos = (int) argv[0].toInteger();
executed 301 times by 2 tests: pos = (int) argv[0].toInteger();
Executed by:
  • tst_ecmascripttests
  • tst_qquickaccessible
301
287-
288-
289 if (pos >= 0
pos >= 0Description
TRUEevaluated 302 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickaccessible
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& pos < str.length()
pos < str.length()Description
TRUEevaluated 294 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickaccessible
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-302
290 return
executed 294 times by 2 tests: return QV4::Encode(Encode(str.at(pos).unicode()));
Executed by:
  • tst_ecmascripttests
  • tst_qquickaccessible
QV4::Encode(Encode(str.at(pos).unicode()));
executed 294 times by 2 tests: return QV4::Encode(Encode(str.at(pos).unicode()));
Executed by:
  • tst_ecmascripttests
  • tst_qquickaccessible
294
291-
292 return
executed 12 times by 1 test: return Encode(qt_qnan());
Executed by:
  • tst_ecmascripttests
Encode(qt_qnan());
executed 12 times by 1 test: return Encode(qt_qnan());
Executed by:
  • tst_ecmascripttests
12
293}-
294-
295ReturnedValue StringPrototype::method_codePointAt(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)-
296{-
297 ExecutionEngine *v4 = f->engine();-
298 QString value = getThisString(v4, thisObject);-
299 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 192 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-192
300 return
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
16
301-
302 int index = argc
argcDescription
TRUEevaluated 192 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
? argv[0].toInteger() : 0;
0-192
303 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 184 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-184
304 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
305-
306 if (index < 0
index < 0Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 172 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| index >= value.size()
index >= value.size()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 164 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-172
307 return
executed 20 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 20 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
20
308-
309 uint first = value.at(index).unicode();-
310 if (QChar::isHighSurrogate(first)
QChar::isHighSurrogate(first)Description
TRUEevaluated 124 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& index + 1 < value.size()
index + 1 < value.size()Description
TRUEevaluated 112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
12-124
311 uint second = value.at(index + 1).unicode();-
312 if (QChar::isLowSurrogate(second)
QChar::isLowSurrogate(second)Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
48-64
313 return
executed 64 times by 1 test: return Encode(QChar::surrogateToUcs4(first, second));
Executed by:
  • tst_ecmascripttests
Encode(QChar::surrogateToUcs4(first, second));
executed 64 times by 1 test: return Encode(QChar::surrogateToUcs4(first, second));
Executed by:
  • tst_ecmascripttests
64
314 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
48
315 return
executed 100 times by 1 test: return Encode(first);
Executed by:
  • tst_ecmascripttests
Encode(first);
executed 100 times by 1 test: return Encode(first);
Executed by:
  • tst_ecmascripttests
100
316}-
317-
318ReturnedValue StringPrototype::method_concat(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
319{-
320 ExecutionEngine *v4 = b->engine();-
321 QString value = getThisString(v4, thisObject);-
322 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
12-52
323 return
executed 12 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 12 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
12
324-
325 Scope scope(v4);-
326 ScopedString s(scope);-
327 for (int i = 0; i < argc
i < argcDescription
TRUEevaluated 584 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i) {
52-584
328 s = argv[i].toString(scope.engine);-
329 if (v4->hasException
v4->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 584 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-584
330 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
331-
332 ((s->isString()) ? static_cast<void>(0) : qt_assert("s->isString()", __FILE__, 385));-
333 value += s->toQString();-
334 }
executed 584 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
584
335-
336 return
executed 52 times by 1 test: return Encode(v4->newString(value));
Executed by:
  • tst_ecmascripttests
Encode(v4->newString(value));
executed 52 times by 1 test: return Encode(v4->newString(value));
Executed by:
  • tst_ecmascripttests
52
337}-
338-
339ReturnedValue StringPrototype::method_endsWith(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
340{-
341 ExecutionEngine *v4 = b->engine();-
342 const QString value = getThisString(v4, thisObject);-
343 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 160 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-160
344 return
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
16
345-
346 if (argc
argcDescription
TRUEevaluated 154 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& argv[0].as<RegExpObject>()
argv[0].as<RegExpObject>()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 149 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-154
347 return
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
8
348 QString searchString = (argc
argcDescription
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
? argv[0] : Primitive::undefinedValue()).toQString();
0-144
349 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 142 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-142
350 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
351-
352 int pos = value.length();-
353 if (argc > 1
argc > 1Description
TRUEevaluated 99 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 43 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
43-99
354 pos = (int) argv[1].toInteger();
executed 99 times by 1 test: pos = (int) argv[1].toInteger();
Executed by:
  • tst_ecmascripttests
99
355-
356 if (pos == value.length()
pos == value.length()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
64-80
357 return
executed 63 times by 1 test: return QV4::Encode(Encode(value.endsWith(searchString)));
Executed by:
  • tst_ecmascripttests
QV4::Encode(Encode(value.endsWith(searchString)));
executed 63 times by 1 test: return QV4::Encode(Encode(value.endsWith(searchString)));
Executed by:
  • tst_ecmascripttests
63
358-
359 QStringRef stringToSearch = value.leftRef(pos);-
360 return
executed 80 times by 1 test: return Encode(stringToSearch.endsWith(searchString));
Executed by:
  • tst_ecmascripttests
Encode(stringToSearch.endsWith(searchString));
executed 80 times by 1 test: return Encode(stringToSearch.endsWith(searchString));
Executed by:
  • tst_ecmascripttests
80
361}-
362-
363ReturnedValue StringPrototype::method_indexOf(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
364{-
365 ExecutionEngine *v4 = b->engine();-
366 const QString value = getThisString(v4, thisObject);-
367 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 15013 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
8-15013
368 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
369-
370 QString searchString = (argc
argcDescription
TRUEevaluated 15008 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? argv[0] : Primitive::undefinedValue()).toQString();
4-15008
371 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 14985 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
28-14985
372 return
executed 28 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 28 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
28
373-
374 int pos = 0;-
375 if (argc > 1
argc > 1Description
TRUEevaluated 2472 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12511 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
)
2472-12511
376 pos = (int) argv[1].toInteger();
executed 2472 times by 1 test: pos = (int) argv[1].toInteger();
Executed by:
  • tst_ecmascripttests
2472
377-
378 int index = -1;-
379 if (! value.isEmpty()
! value.isEmpty()Description
TRUEevaluated 14953 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
32-14953
380 index = value.indexOf(searchString, qMin(qMax(pos, 0), value.length()));
executed 14944 times by 7 tests: index = value.indexOf(searchString, qMin(qMax(pos, 0), value.length()));
Executed by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
14944
381-
382 return
executed 14977 times by 7 tests: return Encode(index);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
Encode(index);
executed 14977 times by 7 tests: return Encode(index);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
14977
383}-
384-
385ReturnedValue StringPrototype::method_includes(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
386{-
387 ExecutionEngine *v4 = b->engine();-
388 const QString value = getThisString(v4, thisObject);-
389 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 160 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
15-160
390 return
executed 15 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 15 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
15
391-
392 if (argc
argcDescription
TRUEevaluated 159 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& argv[0].as<RegExpObject>()
argv[0].as<RegExpObject>()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 152 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-159
393 return
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
8
394 QString searchString = (argc
argcDescription
TRUEevaluated 151 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
? argv[0] : Primitive::undefinedValue()).toQString();
0-151
395 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-144
396 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
397-
398 int pos = 0;-
399 if (argc > 1
argc > 1Description
TRUEevaluated 112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
32-112
400 const Value &posArg = argv[1];-
401 pos = (int) posArg.toInteger();-
402 if (!posArg.isInteger()
!posArg.isInteger()Description
TRUEevaluated 56 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& posArg.isNumber()
posArg.isNumber()Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& qIsInf(posArg.toNumber())
qIsInf(posArg.toNumber())Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-56
403 pos = value.length();
executed 8 times by 1 test: pos = value.length();
Executed by:
  • tst_ecmascripttests
8
404 }
executed 112 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
112
405-
406 if (pos == 0
pos == 0Description
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
64-80
407 return
executed 80 times by 1 test: return QV4::Encode(Encode(value.contains(searchString)));
Executed by:
  • tst_ecmascripttests
QV4::Encode(Encode(value.contains(searchString)));
executed 80 times by 1 test: return QV4::Encode(Encode(value.contains(searchString)));
Executed by:
  • tst_ecmascripttests
80
408-
409 QStringRef stringToSearch = value.midRef(pos);-
410 return
executed 64 times by 1 test: return Encode(stringToSearch.contains(searchString));
Executed by:
  • tst_ecmascripttests
Encode(stringToSearch.contains(searchString));
executed 64 times by 1 test: return Encode(stringToSearch.contains(searchString));
Executed by:
  • tst_ecmascripttests
64
411}-
412-
413ReturnedValue StringPrototype::method_lastIndexOf(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
414{-
415 ExecutionEngine *v4 = b->engine();-
416 const QString value = getThisString(v4, thisObject);-
417 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 238 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
)
8-238
418 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
419-
420 QString searchString = (argc
argcDescription
TRUEevaluated 234 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? argv[0] : Primitive::undefinedValue()).toQString();
4-234
421 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 230 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
)
8-230
422 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
423-
424 double position = argc > 1
argc > 1Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 206 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
? RuntimeHelpers::toNumber(argv[1]) : +qInf();
24-206
425 if (std::isnan(position)
std::isnan(position)Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 222 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
)
8-222
426 position = +qInf();
executed 8 times by 1 test: position = +qInf();
Executed by:
  • tst_ecmascripttests
8
427 else-
428 position = trunc(position);
executed 222 times by 4 tests: position = trunc(position);
Executed by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
222
429-
430 int pos = trunc(qMin(qMax(position, 0.0), double(value.length())));-
431 if (!searchString.isEmpty()
!searchString.isEmpty()Description
TRUEevaluated 230 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
FALSEnever evaluated
&& pos == value.length()
pos == value.length()Description
TRUEevaluated 214 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-230
432 --
executed 214 times by 4 tests: --pos;
Executed by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
pos;
executed 214 times by 4 tests: --pos;
Executed by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
214
433 if (searchString.isNull()
searchString.isNull()Description
TRUEnever evaluated
FALSEevaluated 230 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
&& pos == 0
pos == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0-230
434 return
never executed: return QV4::Encode(Encode(-1));
QV4::Encode(Encode(-1));
never executed: return QV4::Encode(Encode(-1));
0
435 int index = value.lastIndexOf(searchString, pos);-
436 return
executed 229 times by 4 tests: return Encode(index);
Executed by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
Encode(index);
executed 229 times by 4 tests: return Encode(index);
Executed by:
  • tst_ecmascripttests
  • tst_qquickanimationcontroller
  • tst_qquicklayouts
  • tst_testfiltering
229
437}-
438-
439ReturnedValue StringPrototype::method_localeCompare(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
440{-
441 ExecutionEngine *v4 = b->engine();-
442 const QString value = getThisString(v4, thisObject);-
443 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 252 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-252
444 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
445-
446 const QString that = (argc
argcDescription
TRUEevaluated 220 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? argv[0] : Primitive::undefinedValue()).toQString();
32-220
447 return
executed 252 times by 1 test: return Encode(QString::localeAwareCompare(value, that));
Executed by:
  • tst_ecmascripttests
Encode(QString::localeAwareCompare(value, that));
executed 252 times by 1 test: return Encode(QString::localeAwareCompare(value, that));
Executed by:
  • tst_ecmascripttests
252
448}-
449-
450ReturnedValue StringPrototype::method_match(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
451{-
452 ExecutionEngine *v4 = b->engine();-
453 if (thisObject->isNullOrUndefined()
thisObject->is...lOrUndefined()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 415 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
8-415
454 return
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
8
455-
456 Scope scope(v4);-
457 ScopedString s(scope, thisObject->toString(v4));-
458 if (v4->hasException
v4->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 414 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
0-414
459 return
never executed: return Encode::undefined();
Encode::undefined();
never executed: return Encode::undefined();
0
460-
461 Scoped<RegExpObject> that(scope, argc ? argv[0] : Primitive::undefinedValue());-
462 if (!that
!thatDescription
TRUEevaluated 84 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 330 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
) {
84-330
463-
464 that = RegExpCtor::virtualCallAsConstructor(b, argv, argc, b);-
465 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-76
466 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
467 }
executed 76 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
76
468 ((!!that) ? static_cast<void>(0) : qt_assert("!!that", __FILE__, 521));-
469-
470 bool global = that->global();-
471-
472 if (!global
!globalDescription
TRUEevaluated 264 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 142 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
142-264
473 return
executed 264 times by 2 tests: return RegExpPrototype::method_exec(b, that, s, 1);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
RegExpPrototype::method_exec(b, that, s, 1);
executed 264 times by 2 tests: return RegExpPrototype::method_exec(b, that, s, 1);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
264
474-
475-
476 that->setLastIndex(0);-
477 ScopedArrayObject a(scope, scope.engine->newArrayObject());-
478-
479 int previousLastIndex = 0;-
480 uint n = 0;-
481 while (1) {-
482 Value result = Primitive::fromReturnedValue(RegExpPrototype::execFirstMatch(b, that, s, 1));-
483 if (result.isNull()
result.isNull()Description
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 680 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
144-680
484 break;
executed 144 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
144
485 int index = that->lastIndex();-
486 if (previousLastIndex == index
previousLastIndex == indexDescription
TRUEnever evaluated
FALSEevaluated 678 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
0-678
487 previousLastIndex = index + 1;-
488 that->setLastIndex(previousLastIndex);-
489 }
never executed: end of block
else {
0
490 previousLastIndex = index;-
491 }
executed 678 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
678
492 a->arraySet(n, result);-
493 ++n;-
494 }
executed 678 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
678
495 if (!n
!nDescription
TRUEnever evaluated
FALSEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-144
496 return
never executed: return Encode::null();
Encode::null();
never executed: return Encode::null();
0
497 else-
498 return
executed 144 times by 1 test: return a.asReturnedValue();
Executed by:
  • tst_ecmascripttests
a.asReturnedValue();
executed 144 times by 1 test: return a.asReturnedValue();
Executed by:
  • tst_ecmascripttests
144
499}-
500-
501ReturnedValue StringPrototype::method_normalize(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)-
502{-
503 ExecutionEngine *v4 = f->engine();-
504 const QString value = getThisString(v4, thisObject);-
505 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-76
506 return
executed 16 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 16 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
16
507-
508 QString::NormalizationForm form = QString::NormalizationForm_C;-
509 if (argc >= 1
argc >= 1Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& !argv[0].isUndefined()
!argv[0].isUndefined()Description
TRUEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
4-72
510 QString f = argv[0].toQString();-
511 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-60
512 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
513 if (f == QLatin1String("NFC")
f == QLatin1String("NFC")Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 44 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-44
514 form = QString::NormalizationForm_C;
executed 16 times by 1 test: form = QString::NormalizationForm_C;
Executed by:
  • tst_ecmascripttests
16
515 else if (f == QLatin1String("NFD")
f == QLatin1String("NFD")Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-28
516 form = QString::NormalizationForm_D;
executed 16 times by 1 test: form = QString::NormalizationForm_D;
Executed by:
  • tst_ecmascripttests
16
517 else if (f == QLatin1String("NFKC")
f == QLatin1String("NFKC")Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-20
518 form = QString::NormalizationForm_KC;
executed 8 times by 1 test: form = QString::NormalizationForm_KC;
Executed by:
  • tst_ecmascripttests
8
519 else if (f == QLatin1String("NFKD")
f == QLatin1String("NFKD")Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-12
520 form = QString::NormalizationForm_KD;
executed 8 times by 1 test: form = QString::NormalizationForm_KD;
Executed by:
  • tst_ecmascripttests
8
521 else-
522 return
executed 12 times by 1 test: return v4->throwRangeError(QLatin1String("String.prototype.normalize: Invalid normalization form."));
Executed by:
  • tst_ecmascripttests
v4->throwRangeError(QLatin1String("String.prototype.normalize: Invalid normalization form."));
executed 12 times by 1 test: return v4->throwRangeError(QLatin1String("String.prototype.normalize: Invalid normalization form."));
Executed by:
  • tst_ecmascripttests
12
523 }-
524 QString normalized = value.normalized(form);-
525 return
executed 56 times by 1 test: return v4->newString(normalized)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
v4->newString(normalized)->asReturnedValue();
executed 56 times by 1 test: return v4->newString(normalized)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
56
526}-
527-
528ReturnedValue StringPrototype::method_padEnd(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)-
529{-
530 ExecutionEngine *v4 = f->engine();-
531 if (thisObject->isNullOrUndefined()
thisObject->is...lOrUndefined()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 96 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-96
532 return
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
8
533-
534 Scope scope(v4);-
535 ScopedString s(scope, thisAsString(v4, thisObject));-
536 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-88
537 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
538 if (!argc
!argcDescription
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-88
539 return
never executed: return s->asReturnedValue();
s->asReturnedValue();
never executed: return s->asReturnedValue();
0
540-
541 int maxLen = argv[0].toInteger();-
542 if (maxLen <= s->d()->length()
maxLen <= s->d()->length()Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
32-56
543 return
executed 32 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
s->asReturnedValue();
executed 32 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
32
544 QString fillString = (argc > 1
argc > 1Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& !argv[1].isUndefined()
!argv[1].isUndefined()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) ? argv[1].toQString() : QString::fromLatin1(" ");
4-52
545 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-52
546 return
executed 4 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 4 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
4
547-
548 if (fillString.isEmpty()
fillString.isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-48
549 return
executed 4 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
s->asReturnedValue();
executed 4 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
4
550-
551 QString padded = s->toQString();-
552 int oldLength = padded.length();-
553 int toFill = maxLen - oldLength;-
554 padded.resize(maxLen);-
555 QChar *ch = padded.data() + oldLength;-
556 while (toFill
toFillDescription
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
48-144
557 int copy = qMin(fillString.length(), toFill);-
558 memcpy(ch, fillString.constData(), copy*sizeof(QChar));-
559 toFill -= copy;-
560 ch += copy;-
561 }
executed 144 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
144
562 *ch = 0;-
563-
564 return
executed 48 times by 1 test: return v4->newString(padded)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
v4->newString(padded)->asReturnedValue();
executed 48 times by 1 test: return v4->newString(padded)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
48
565}-
566-
567ReturnedValue StringPrototype::method_padStart(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)-
568{-
569 ExecutionEngine *v4 = f->engine();-
570 if (thisObject->isNullOrUndefined()
thisObject->is...lOrUndefined()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 95 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-95
571 return
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
8
572-
573 Scope scope(v4);-
574 ScopedString s(scope, thisAsString(v4, thisObject));-
575 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-88
576 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
577 if (!argc
!argcDescription
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-88
578 return
never executed: return s->asReturnedValue();
s->asReturnedValue();
never executed: return s->asReturnedValue();
0
579-
580 int maxLen = argv[0].toInteger();-
581 if (maxLen <= s->d()->length()
maxLen <= s->d()->length()Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
32-56
582 return
executed 32 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
s->asReturnedValue();
executed 32 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
32
583 QString fillString = (argc > 1
argc > 1Description
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& !argv[1].isUndefined()
!argv[1].isUndefined()Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) ? argv[1].toQString() : QString::fromLatin1(" ");
4-52
584 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-52
585 return
executed 4 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 4 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
4
586-
587 if (fillString.isEmpty()
fillString.isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-48
588 return
executed 4 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
s->asReturnedValue();
executed 4 times by 1 test: return s->asReturnedValue();
Executed by:
  • tst_ecmascripttests
4
589-
590 QString original = s->toQString();-
591 int oldLength = original.length();-
592 int toFill = maxLen - oldLength;-
593 QString padded;-
594 padded.resize(maxLen);-
595 QChar *ch = padded.data();-
596 while (toFill
toFillDescription
TRUEevaluated 144 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
48-144
597 int copy = qMin(fillString.length(), toFill);-
598 memcpy(ch, fillString.constData(), copy*sizeof(QChar));-
599 toFill -= copy;-
600 ch += copy;-
601 }
executed 144 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
144
602 memcpy(ch, original.constData(), oldLength*sizeof(QChar));-
603 ch += oldLength;-
604 *ch = 0;-
605-
606 return
executed 48 times by 1 test: return v4->newString(padded)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
v4->newString(padded)->asReturnedValue();
executed 48 times by 1 test: return v4->newString(padded)->asReturnedValue();
Executed by:
  • tst_ecmascripttests
48
607}-
608-
609-
610ReturnedValue StringPrototype::method_repeat(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
611{-
612 ExecutionEngine *v4 = b->engine();-
613 const QString value = getThisString(v4, thisObject);-
614 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-72
615 return
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
16
616-
617 double repeats = (argc
argcDescription
TRUEevaluated 71 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
? argv[0] : Primitive::undefinedValue()).toInteger();
0-71
618-
619 if (repeats < 0
repeats < 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| qIsInf(repeats)
qIsInf(repeats)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-64
620 return
executed 12 times by 1 test: return v4->throwRangeError(QLatin1String("Invalid count value"));
Executed by:
  • tst_ecmascripttests
v4->throwRangeError(QLatin1String("Invalid count value"));
executed 12 times by 1 test: return v4->throwRangeError(QLatin1String("Invalid count value"));
Executed by:
  • tst_ecmascripttests
12
621-
622 return
executed 60 times by 1 test: return Encode(v4->newString(value.repeated(int(repeats))));
Executed by:
  • tst_ecmascripttests
Encode(v4->newString(value.repeated(int(repeats))));
executed 60 times by 1 test: return Encode(v4->newString(value.repeated(int(repeats))));
Executed by:
  • tst_ecmascripttests
60
623}-
624-
625static void appendReplacementString(QString *result, const QString &input, const QString& replaceValue, uint* matchOffsets, int captureCount)-
626{-
627 result->reserve(result->length() + replaceValue.length());-
628 for (int i = 0; i < replaceValue.length()
i < replaceValue.length()Description
TRUEevaluated 603 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 780 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i) {
603-780
629 if (replaceValue.at(i) == QLatin1Char('$')
replaceValue.a...atin1Char('$')Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 532 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& i < replaceValue.length() - 1
i < replaceValue.length() - 1Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
) {
0-532
630 ushort ch = replaceValue.at(++i).unicode();-
631 uint substStart = JSC::Yarr::offsetNoMatch;-
632 uint substEnd = JSC::Yarr::offsetNoMatch;-
633 if (ch == '$'
ch == '$'Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
12-60
634 *result += QChar(ch);-
635 continue;
executed 12 times by 1 test: continue;
Executed by:
  • tst_ecmascripttests
12
636 } else if (ch == '&'
ch == '&'Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
12-48
637 substStart = matchOffsets[0];-
638 substEnd = matchOffsets[1];-
639 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else if (ch == '`'
ch == '`'Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
12-36
640 substStart = 0;-
641 substEnd = matchOffsets[0];-
642 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else if (ch == '\''
ch == '\''Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
12-24
643 substStart = matchOffsets[1];-
644 substEnd = input.length();-
645 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else if (ch >= '1'
ch >= '1'Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& ch <= '9'
ch <= '9'Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
) {
0-24
646 uint capture = ch - '0';-
647 ((capture > 0) ? static_cast<void>(0) : qt_assert("capture > 0", __FILE__, 700));-
648 if (capture < static_cast<uint>(captureCount)
capture < stat...(captureCount)Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
) {
0-24
649 substStart = matchOffsets[capture * 2];-
650 substEnd = matchOffsets[capture * 2 + 1];-
651 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
24
652 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else if (ch == '0'
ch == '0'Description
TRUEnever evaluated
FALSEnever evaluated
&& i < replaceValue.length() - 1
i < replaceValue.length() - 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-24
653 int capture = (ch - '0') * 10;-
654 ch = replaceValue.at(++i).unicode();-
655 if (ch >= '0'
ch >= '0'Description
TRUEnever evaluated
FALSEnever evaluated
&& ch <= '9'
ch <= '9'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
656 capture += ch - '0';-
657 if (capture > 0
capture > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& capture < captureCount
capture < captureCountDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
658 substStart = matchOffsets[capture * 2];-
659 substEnd = matchOffsets[capture * 2 + 1];-
660 }
never executed: end of block
0
661 }
never executed: end of block
0
662 }
never executed: end of block
0
663 if (substStart != JSC::Yarr::offsetNoMatch
substStart != ...:offsetNoMatchDescription
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& substEnd != JSC::Yarr::offsetNoMatch
substEnd != JS...:offsetNoMatchDescription
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
)
0-60
664 *
executed 60 times by 1 test: *result += input.midRef(substStart, substEnd - substStart);
Executed by:
  • tst_ecmascripttests
result += input.midRef(substStart, substEnd - substStart);
executed 60 times by 1 test: *result += input.midRef(substStart, substEnd - substStart);
Executed by:
  • tst_ecmascripttests
60
665 }
executed 59 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
59
666 *result += replaceValue.at(i);-
667 }
executed 532 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
532
668 }-
669}
executed 780 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
780
670-
671ReturnedValue StringPrototype::method_replace(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
672{-
673 QString string;-
674 if (const
const StringOb...tringObject>()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2267 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
StringObject *thisString = thisObject->as<StringObject>()
const StringOb...tringObject>()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2267 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
)
12-2267
675 string = thisString->d()->string->toQString();
executed 12 times by 1 test: string = thisString->d()->string->toQString();
Executed by:
  • tst_ecmascripttests
12
676 else-
677 string = thisObject->toQString();
executed 2267 times by 3 tests: string = thisObject->toQString();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
2267
678-
679 int numCaptures = 0;-
680 int numStringMatches = 0;-
681-
682 uint allocatedMatchOffsets = 64;-
683 uint _matchOffsets[64];-
684 uint *matchOffsets = _matchOffsets;-
685-
686 Scope scope(b);-
687 ScopedValue searchValue(scope, argc ? argv[0] : Primitive::undefinedValue());-
688 Scoped<RegExpObject> regExp(scope, searchValue);-
689 if (regExp
regExpDescription
TRUEevaluated 2199 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
FALSEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
80-2199
690 uint offset = 0;-
691 uint nMatchOffsets = 0;-
692-
693-
694 Scoped<RegExp> re(scope, regExp->value());-
695 while (true) {-
696 int oldSize = nMatchOffsets;-
697 if (allocatedMatchOffsets < nMatchOffsets + re->captureCount() * 2
allocatedMatch...ureCount() * 2Description
TRUEnever evaluated
FALSEevaluated 2937 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
) {
0-2937
698 allocatedMatchOffsets = qMax(allocatedMatchOffsets * 2, nMatchOffsets + re->captureCount() * 2);-
699 uint *newOffsets = (uint *)malloc(allocatedMatchOffsets*sizeof(uint));-
700 memcpy(newOffsets, matchOffsets, nMatchOffsets*sizeof(uint));-
701 if (matchOffsets != _matchOffsets
matchOffsets != _matchOffsetsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
702 free(matchOffsets);
never executed: free(matchOffsets);
0
703 matchOffsets = newOffsets;-
704 }
never executed: end of block
0
705 if (re->match(string, offset, matchOffsets + oldSize) == JSC::Yarr::offsetNoMatch
re->match(stri...:offsetNoMatchDescription
TRUEevaluated 2144 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
FALSEevaluated 794 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
) {
794-2144
706 nMatchOffsets = oldSize;-
707 break;
executed 2144 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
2144
708 }-
709 nMatchOffsets += re->captureCount() * 2;-
710 if (!regExp->global()
!regExp->global()Description
TRUEevaluated 56 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 738 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
56-738
711 break;
executed 56 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
56
712 offset = qMax(offset + 1, matchOffsets[oldSize + 1]);-
713 }
executed 738 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
738
714 if (regExp->global()
regExp->global()Description
TRUEevaluated 2144 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
FALSEevaluated 55 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
55-2144
715 regExp->setLastIndex(0);
executed 2144 times by 3 tests: regExp->setLastIndex(0);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
2144
716 numStringMatches = nMatchOffsets / (regExp->value()->captureCount() * 2);-
717 numCaptures = regExp->value()->captureCount();-
718 }
executed 2200 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
else {
2200
719 numCaptures = 1;-
720 QString searchString = searchValue->toQString();-
721 int idx = string.indexOf(searchString);-
722 if (idx != -1
idx != -1Description
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
20-60
723 numStringMatches = 1;-
724 matchOffsets[0] = idx;-
725 matchOffsets[1] = idx + searchString.length();-
726 }
executed 60 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
60
727 }
executed 80 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
80
728-
729 QString result;-
730 ScopedValue replacement(scope);-
731 ScopedValue replaceValue(scope, argc > 1 ? argv[1] : Primitive::undefinedValue());-
732 ScopedFunctionObject searchCallback(scope, replaceValue);-
733 if (!!searchCallback
!!searchCallbackDescription
TRUEevaluated 64 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 2216 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
) {
64-2216
734 result.reserve(string.length() + 10*numStringMatches);-
735 ScopedValue entry(scope);-
736 Value *arguments = scope.alloc(numCaptures + 2);-
737 int lastEnd = 0;-
738 for (int i = 0; i < numStringMatches
i < numStringMatchesDescription
TRUEevaluated 74 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 64 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
; ++i) {
64-74
739 for (int k = 0; k < numCaptures
k < numCapturesDescription
TRUEevaluated 128 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 74 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
; ++k) {
74-128
740 int idx = (i * numCaptures + k) * 2;-
741 uint start = matchOffsets[idx];-
742 uint end = matchOffsets[idx + 1];-
743 entry = Primitive::undefinedValue();-
744 if (start != JSC::Yarr::offsetNoMatch
start != JSC::...:offsetNoMatchDescription
TRUEevaluated 128 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEnever evaluated
&& end != JSC::Yarr::offsetNoMatch
end != JSC::Ya...:offsetNoMatchDescription
TRUEevaluated 128 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEnever evaluated
)
0-128
745 entry = scope.engine->newString(string.mid(start, end - start));
executed 128 times by 2 tests: entry = scope.engine->newString(string.mid(start, end - start));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
128
746 arguments[k] = entry;-
747 }
executed 128 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
128
748 uint matchStart = matchOffsets[i * numCaptures * 2];-
749 ((matchStart >= static_cast<uint>(lastEnd)) ? static_cast<void>(0) : qt_assert("matchStart >= static_cast<uint>(lastEnd)", __FILE__, 802));-
750 uint matchEnd = matchOffsets[i * numCaptures * 2 + 1];-
751 arguments[numCaptures] = Primitive::fromUInt32(matchStart);-
752 arguments[numCaptures + 1] = scope.engine->newString(string);-
753-
754 Value that = Primitive::undefinedValue();-
755 replacement = searchCallback->call(&that, arguments, numCaptures + 2);-
756 result += string.midRef(lastEnd, matchStart - lastEnd);-
757 result += replacement->toQString();-
758 lastEnd = matchEnd;-
759 }
executed 74 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
74
760 result += string.midRef(lastEnd);-
761 }
executed 64 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
else {
64
762 QString newString = replaceValue->toQString();-
763 result.reserve(string.length() + numStringMatches*newString.size());-
764-
765 int lastEnd = 0;-
766 for (int i = 0; i < numStringMatches
i < numStringMatchesDescription
TRUEevaluated 780 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2216 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
; ++i) {
780-2216
767 int baseIndex = i * numCaptures * 2;-
768 uint matchStart = matchOffsets[baseIndex];-
769 uint matchEnd = matchOffsets[baseIndex + 1];-
770 if (matchStart == JSC::Yarr::offsetNoMatch
matchStart == ...:offsetNoMatchDescription
TRUEnever evaluated
FALSEevaluated 780 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-780
771 continue;
never executed: continue;
0
772-
773 result += string.midRef(lastEnd, matchStart - lastEnd);-
774 appendReplacementString(&result, string, newString, matchOffsets + baseIndex, numCaptures);-
775 lastEnd = matchEnd;-
776 }
executed 780 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
780
777 result += string.midRef(lastEnd);-
778 }
executed 2216 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
2216
779-
780 if (matchOffsets != _matchOffsets
matchOffsets != _matchOffsetsDescription
TRUEnever evaluated
FALSEevaluated 2280 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
)
0-2280
781 free(matchOffsets);
never executed: free(matchOffsets);
0
782-
783 return
executed 2280 times by 3 tests: return Encode(scope.engine->newString(result));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
Encode(scope.engine->newString(result));
executed 2280 times by 3 tests: return Encode(scope.engine->newString(result));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
2280
784}-
785-
786ReturnedValue StringPrototype::method_search(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
787{-
788 Scope scope(b);-
789 QString string = getThisString(scope.engine, thisObject);-
790 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-112
791 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
792-
793 Scoped<RegExpObject> regExp(scope, argc ? argv[0] : Primitive::undefinedValue());-
794 if (!regExp
!regExpDescription
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
32-80
795 regExp = scope.engine->regExpCtor()->callAsConstructor(argv, 1);-
796 if (scope.engine->hasException
scope.engine->hasExceptionDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
7-72
797 return
executed 7 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 7 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
7
798-
799 ((regExp) ? static_cast<void>(0) : qt_assert("regExp", __FILE__, 852));-
800 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
72
801 Scoped<RegExp> re(scope, regExp->value());-
802 uint *matchOffsets = 0; matchOffsets = static_cast<uint*>(-
803 __builtin_alloca (-
804 regExp->value()->captureCount() * 2 * sizeof(uint)-
805 )-
806 );-
807 uint result = re->match(string, 0, matchOffsets);-
808 if (result == JSC::Yarr::offsetNoMatch
result == JSC:...:offsetNoMatchDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-88
809 return
executed 16 times by 1 test: return Encode(-1);
Executed by:
  • tst_ecmascripttests
Encode(-1);
executed 16 times by 1 test: return Encode(-1);
Executed by:
  • tst_ecmascripttests
16
810 else-
811 return
executed 88 times by 1 test: return Encode(result);
Executed by:
  • tst_ecmascripttests
Encode(result);
executed 88 times by 1 test: return Encode(result);
Executed by:
  • tst_ecmascripttests
88
812}-
813-
814ReturnedValue StringPrototype::method_slice(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
815{-
816 ExecutionEngine *v4 = b->engine();-
817 Scope scope(v4);-
818 ScopedString s(scope, thisAsString(v4, thisObject));-
819 if (v4->hasException
v4->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 280 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-280
820 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
821 ((s) ? static_cast<void>(0) : qt_assert("s", __FILE__, 870));-
822-
823 const double length = s->d()->length();-
824-
825 double start = argc
argcDescription
TRUEevaluated 272 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? argv[0].toInteger() : 0;
8-272
826 double end = (argc < 2
argc < 2Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 264 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| argv[1].isUndefined()
argv[1].isUndefined()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 252 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
12-264
827 ? length : argv[1].toInteger();-
828-
829 if (start < 0
start < 0Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 268 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
12-268
830 start = qMax(length + start, 0.);
executed 12 times by 1 test: start = qMax(length + start, 0.);
Executed by:
  • tst_ecmascripttests
12
831 else-
832 start = qMin(start, length);
executed 268 times by 1 test: start = qMin(start, length);
Executed by:
  • tst_ecmascripttests
268
833-
834 if (end < 0
end < 0Description
TRUEevaluated 164 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 116 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
116-164
835 end = qMax(length + end, 0.);
executed 164 times by 1 test: end = qMax(length + end, 0.);
Executed by:
  • tst_ecmascripttests
164
836 else-
837 end = qMin(end, length);
executed 116 times by 1 test: end = qMin(end, length);
Executed by:
  • tst_ecmascripttests
116
838-
839 const int intStart = int(start);-
840 const int intEnd = int(end);-
841-
842 int count = qMax(0, intEnd - intStart);-
843 return
executed 280 times by 1 test: return Encode(v4->memoryManager->alloc<ComplexString>(s->d(), intStart, count));
Executed by:
  • tst_ecmascripttests
Encode(v4->memoryManager->alloc<ComplexString>(s->d(), intStart, count));
executed 280 times by 1 test: return Encode(v4->memoryManager->alloc<ComplexString>(s->d(), intStart, count));
Executed by:
  • tst_ecmascripttests
280
844}-
845-
846ReturnedValue StringPrototype::method_split(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
847{-
848 ExecutionEngine *v4 = b->engine();-
849 QString text = getThisString(v4, thisObject);-
850 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 486 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
)
8-486
851 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
852-
853 Scope scope(v4);-
854 ScopedValue separatorValue(scope, argc ? argv[0] : Primitive::undefinedValue());-
855 ScopedValue limitValue(scope, argc > 1 ? argv[1] : Primitive::undefinedValue());-
856-
857 ScopedArrayObject array(scope, scope.engine->newArrayObject());-
858-
859 if (separatorValue->isUndefined()
separatorValue->isUndefined()Description
TRUEevaluated 71 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 420 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
) {
71-420
860 if (limitValue->isUndefined()
limitValue->isUndefined()Description
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
) {
0-72
861 ScopedString s(scope, scope.engine->newString(text));-
862 array->push_back(s);-
863 return
executed 70 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
array.asReturnedValue();
executed 70 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
70
864 }-
865 return
never executed: return QV4::Encode(scope.engine->newString(text.left(limitValue->toInteger())));
QV4::Encode(scope.engine->newString(text.left(limitValue->toInteger())));
never executed: return QV4::Encode(scope.engine->newString(text.left(limitValue->toInteger())));
0
866 }-
867-
868 uint limit = limitValue->isUndefined()
limitValue->isUndefined()Description
TRUEevaluated 268 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
FALSEevaluated 152 times by 1 test
Evaluated by:
  • tst_ecmascripttests
?
152-268
869 (0x7fffffff * 2U + 1U) -
870 : limitValue->toUInt32();-
871-
872 if (limit == 0
limit == 0Description
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 358 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
)
60-358
873 return
executed 60 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
array.asReturnedValue();
executed 60 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
60
874-
875 Scoped<RegExpObject> re(scope, separatorValue);-
876 if (re
reDescription
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 256 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
) {
104-256
877 if (re->value()->pattern->isEmpty()
re->value()->p...ern->isEmpty()Description
TRUEevaluated 31 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
31-72
878 re = (RegExpObject *)nullptr;-
879 separatorValue = scope.engine->newString();-
880 }
executed 32 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
32
881 }
executed 104 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
104
882-
883 ScopedString s(scope);-
884 if (re
reDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 286 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
) {
72-286
885 uint offset = 0;-
886 uint *matchOffsets = 0; matchOffsets = static_cast<uint*>(-
887 __builtin_alloca (-
888 re->value()->captureCount() * 2 * sizeof(uint)-
889 )-
890 );-
891 while (true) {-
892 Scoped<RegExp> regexp(scope, re->value());-
893 uint result = regexp->match(text, offset, matchOffsets);-
894 if (result == JSC::Yarr::offsetNoMatch
result == JSC:...:offsetNoMatchDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 160 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
52-160
895 break;
executed 52 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
52
896-
897 array->push_back((s = scope.engine->newString(text.mid(offset, matchOffsets[0] - offset))));-
898 offset = qMax(offset + 1, matchOffsets[1]);-
899-
900 if (array->getLength() >= limit
array->getLength() >= limitDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
20-140
901 break;
executed 20 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
20
902-
903 for (int i = 1; i < re->value()->captureCount()
i < re->value(...captureCount()Description
TRUEnever evaluated
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i) {
0-140
904 uint start = matchOffsets[i * 2];-
905 uint end = matchOffsets[i * 2 + 1];-
906 array->push_back((s = scope.engine->newString(text.mid(start, end - start))));-
907 if (array->getLength() >= limit
array->getLength() >= limitDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
908 break;
never executed: break;
0
909 }
never executed: end of block
0
910 }
executed 140 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
140
911 if (array->getLength() < limit
array->getLength() < limitDescription
TRUEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
20-52
912 array->push_back((s = scope.engine->newString(text.mid(offset))));
executed 52 times by 1 test: array->push_back((s = scope.engine->newString(text.mid(offset))));
Executed by:
  • tst_ecmascripttests
52
913 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
else {
72
914 QString separator = separatorValue->toQString();-
915 if (separator.isEmpty()
separator.isEmpty()Description
TRUEevaluated 47 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 240 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
) {
47-240
916 for (uint i = 0; i < qMin(limit, uint(text.length()))
i < qMin(limit...ext.length()))Description
TRUEevaluated 307 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++i)
48-307
917 array->push_back((s = scope.engine->newString(text.mid(i, 1))));
executed 307 times by 1 test: array->push_back((s = scope.engine->newString(text.mid(i, 1))));
Executed by:
  • tst_ecmascripttests
307
918 return
executed 48 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
array.asReturnedValue();
executed 48 times by 1 test: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
48
919 }-
920-
921 int start = 0;-
922 int end;-
923 while ((
(end = text.in... start)) != -1Description
TRUEevaluated 368 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
FALSEevaluated 211 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
end = text.indexOf(separator, start)) != -1
(end = text.in... start)) != -1Description
TRUEevaluated 368 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
FALSEevaluated 211 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
) {
211-368
924 array->push_back((s = scope.engine->newString(text.mid(start, end - start))));-
925 start = end + separator.size();-
926 if (array->getLength() >= limit
array->getLength() >= limitDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 340 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
)
28-340
927 break;
executed 28 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
28
928 }
executed 340 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
340
929 if (array->getLength() < limit
array->getLength() < limitDescription
TRUEevaluated 211 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& start != -1
start != -1Description
TRUEevaluated 211 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
FALSEnever evaluated
)
0-211
930 array->push_back((s = scope.engine->newString(text.mid(start))));
executed 212 times by 3 tests: array->push_back((s = scope.engine->newString(text.mid(start))));
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
212
931 }
executed 240 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
240
932 return
executed 312 times by 3 tests: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
array.asReturnedValue();
executed 312 times by 3 tests: return array.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
312
933}-
934-
935ReturnedValue StringPrototype::method_startsWith(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
936{-
937 ExecutionEngine *v4 = b->engine();-
938 const QString value = getThisString(v4, thisObject);-
939 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 148 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
16-148
940 return
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 16 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
16
941-
942 if (argc
argcDescription
TRUEevaluated 148 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& argv[0].as<RegExpObject>()
argv[0].as<RegExpObject>()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-148
943 return
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
v4->throwTypeError();
executed 8 times by 1 test: return v4->throwTypeError();
Executed by:
  • tst_ecmascripttests
8
944 QString searchString = (argc
argcDescription
TRUEevaluated 140 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
? argv[0] : Primitive::undefinedValue()).toQString();
0-140
945 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 132 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-132
946 return
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
Encode::undefined();
executed 8 times by 1 test: return Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
947-
948 int pos = 0;-
949 if (argc > 1
argc > 1Description
TRUEevaluated 96 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
36-96
950 pos = (int) argv[1].toInteger();
executed 96 times by 1 test: pos = (int) argv[1].toInteger();
Executed by:
  • tst_ecmascripttests
96
951-
952 if (pos == 0
pos == 0Description
TRUEevaluated 76 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
56-76
953 return
executed 76 times by 1 test: return Encode(value.startsWith(searchString));
Executed by:
  • tst_ecmascripttests
Encode(value.startsWith(searchString));
executed 76 times by 1 test: return Encode(value.startsWith(searchString));
Executed by:
  • tst_ecmascripttests
76
954-
955 QStringRef stringToSearch = value.midRef(pos);-
956 return
executed 56 times by 1 test: return QV4::Encode(Encode(stringToSearch.startsWith(searchString)));
Executed by:
  • tst_ecmascripttests
QV4::Encode(Encode(stringToSearch.startsWith(searchString)));
executed 56 times by 1 test: return QV4::Encode(Encode(stringToSearch.startsWith(searchString)));
Executed by:
  • tst_ecmascripttests
56
957}-
958-
959ReturnedValue StringPrototype::method_substr(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
960{-
961 ExecutionEngine *v4 = b->engine();-
962 const QString value = getThisString(v4, thisObject);-
963 if (v4->hasException
v4->hasExceptionDescription
TRUEnever evaluated
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
)
0-40
964 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
965-
966 double start = 0;-
967 if (argc > 0
argc > 0Description
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
FALSEnever evaluated
)
0-40
968 start = argv[0].toInteger();
executed 40 times by 3 tests: start = argv[0].toInteger();
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
40
969-
970 double length = +qInf();-
971 if (argc > 1
argc > 1Description
TRUEevaluated 36 times by 3 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_signalspy
)
4-36
972 length = argv[1].toInteger();
executed 36 times by 3 tests: length = argv[1].toInteger();
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
36
973-
974 double count = value.length();-
975 if (start < 0
start < 0Description
TRUEnever evaluated
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
)
0-40
976 start = qMax(count + start, 0.0);
never executed: start = qMax(count + start, 0.0);
0
977-
978 length = qMin(qMax(length, 0.0), count - start);-
979-
980 qint32 x = Primitive::toInt32(start);-
981 qint32 y = Primitive::toInt32(length);-
982 return
executed 40 times by 3 tests: return Encode(v4->newString(value.mid(x, y)));
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
Encode(v4->newString(value.mid(x, y)));
executed 40 times by 3 tests: return Encode(v4->newString(value.mid(x, y)));
Executed by:
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_signalspy
40
983}-
984-
985ReturnedValue StringPrototype::method_substring(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
986{-
987 ExecutionEngine *v4 = b->engine();-
988 const QString value = getThisString(v4, thisObject);-
989 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 191 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-191
990 return
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 8 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
8
991-
992 int length = value.length();-
993-
994 double start = 0;-
995 double end = length;-
996-
997 if (argc > 0
argc > 0Description
TRUEevaluated 184 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-184
998 start = argv[0].toInteger();
executed 184 times by 1 test: start = argv[0].toInteger();
Executed by:
  • tst_ecmascripttests
184
999-
1000 if (argc > 1
argc > 1Description
TRUEevaluated 179 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& !argv[1].isUndefined()
!argv[1].isUndefined()Description
TRUEevaluated 164 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
12-179
1001 end = argv[1].toInteger();
executed 164 times by 1 test: end = argv[1].toInteger();
Executed by:
  • tst_ecmascripttests
164
1002-
1003 if (std::isnan(start)
std::isnan(start)Description
TRUEnever evaluated
FALSEevaluated 192 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| start < 0
start < 0Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 172 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-192
1004 start = 0;
executed 20 times by 1 test: start = 0;
Executed by:
  • tst_ecmascripttests
20
1005-
1006 if (std::isnan(end)
std::isnan(end)Description
TRUEnever evaluated
FALSEevaluated 192 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| end < 0
end < 0Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 168 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-192
1007 end = 0;
executed 24 times by 1 test: end = 0;
Executed by:
  • tst_ecmascripttests
24
1008-
1009 if (start > length
start > lengthDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 164 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
28-164
1010 start = length;
executed 28 times by 1 test: start = length;
Executed by:
  • tst_ecmascripttests
28
1011-
1012 if (end > length
end > lengthDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 172 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
20-172
1013 end = length;
executed 20 times by 1 test: end = length;
Executed by:
  • tst_ecmascripttests
20
1014-
1015 if (start > end
start > endDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 156 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
36-156
1016 double was = start;-
1017 start = end;-
1018 end = was;-
1019 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
36
1020-
1021 qint32 x = (int)start;-
1022 qint32 y = (int)(end - start);-
1023 return
executed 191 times by 1 test: return Encode(v4->newString(value.mid(x, y)));
Executed by:
  • tst_ecmascripttests
Encode(v4->newString(value.mid(x, y)));
executed 191 times by 1 test: return Encode(v4->newString(value.mid(x, y)));
Executed by:
  • tst_ecmascripttests
191
1024}-
1025-
1026ReturnedValue StringPrototype::method_toLowerCase(const FunctionObject *b, const Value *thisObject, const Value *, int)-
1027{-
1028 ExecutionEngine *v4 = b->engine();-
1029 const QString value = getThisString(v4, thisObject);-
1030 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1292 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
32-1292
1031 return
executed 32 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 32 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
32
1032-
1033 return
executed 1292 times by 1 test: return Encode(v4->newString(value.toLower()));
Executed by:
  • tst_ecmascripttests
Encode(v4->newString(value.toLower()));
executed 1292 times by 1 test: return Encode(v4->newString(value.toLower()));
Executed by:
  • tst_ecmascripttests
1292
1034}-
1035-
1036ReturnedValue StringPrototype::method_toLocaleLowerCase(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
1037{-
1038 return
executed 658 times by 1 test: return method_toLowerCase(b, thisObject, argv, argc);
Executed by:
  • tst_ecmascripttests
method_toLowerCase(b, thisObject, argv, argc);
executed 658 times by 1 test: return method_toLowerCase(b, thisObject, argv, argc);
Executed by:
  • tst_ecmascripttests
658
1039}-
1040-
1041ReturnedValue StringPrototype::method_toUpperCase(const FunctionObject *b, const Value *thisObject, const Value *, int)-
1042{-
1043 ExecutionEngine *v4 = b->engine();-
1044 const QString value = getThisString(v4, thisObject);-
1045 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 557416 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_signalspy
)
32-557416
1046 return
executed 32 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 32 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
32
1047-
1048 return
executed 557416 times by 2 tests: return Encode(v4->newString(value.toUpper()));
Executed by:
  • tst_ecmascripttests
  • tst_signalspy
Encode(v4->newString(value.toUpper()));
executed 557416 times by 2 tests: return Encode(v4->newString(value.toUpper()));
Executed by:
  • tst_ecmascripttests
  • tst_signalspy
557416
1049}-
1050-
1051ReturnedValue StringPrototype::method_toLocaleUpperCase(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc)-
1052{-
1053 return
executed 652 times by 1 test: return method_toUpperCase(b, thisObject, argv, argc);
Executed by:
  • tst_ecmascripttests
method_toUpperCase(b, thisObject, argv, argc);
executed 652 times by 1 test: return method_toUpperCase(b, thisObject, argv, argc);
Executed by:
  • tst_ecmascripttests
652
1054}-
1055-
1056ReturnedValue StringPrototype::method_trim(const FunctionObject *b, const Value *thisObject, const Value *, int)-
1057{-
1058 ExecutionEngine *v4 = b->engine();-
1059 QString s = getThisString(v4, thisObject);-
1060 if (v4->hasException
v4->hasExceptionDescription
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 500 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
11-500
1061 return
executed 11 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
QV4::Encode::undefined();
executed 11 times by 1 test: return QV4::Encode::undefined();
Executed by:
  • tst_ecmascripttests
11
1062-
1063 const QChar *chars = s.constData();-
1064 int start, end;-
1065 for (start = 0; start < s.length()
start < s.length()Description
TRUEevaluated 1163 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 63 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; ++start) {
63-1163
1066 if (!chars[start].isSpace()
!chars[start].isSpace()Description
TRUEevaluated 463 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 703 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& chars[start].unicode() != 0xfeff
chars[start].u...de() != 0xfeffDescription
TRUEevaluated 436 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
28-703
1067 break;
executed 435 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
435
1068 }
executed 731 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
731
1069 for (end = s.length() - 1; end >= start
end >= startDescription
TRUEevaluated 776 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 63 times by 1 test
Evaluated by:
  • tst_ecmascripttests
; --end) {
63-776
1070 if (!chars[end].isSpace()
!chars[end].isSpace()Description
TRUEevaluated 448 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 331 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& chars[end].unicode() != 0xfeff
chars[end].unicode() != 0xfeffDescription
TRUEevaluated 436 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
12-448
1071 break;
executed 436 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
436
1072 }
executed 343 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
343
1073-
1074 return
executed 498 times by 1 test: return Encode(v4->newString(QString(chars + start, end - start + 1)));
Executed by:
  • tst_ecmascripttests
Encode(v4->newString(QString(chars + start, end - start + 1)));
executed 498 times by 1 test: return Encode(v4->newString(QString(chars + start, end - start + 1)));
Executed by:
  • tst_ecmascripttests
498
1075}-
1076-
1077-
1078-
1079ReturnedValue StringPrototype::method_iterator(const FunctionObject *b, const Value *thisObject, const Value *, int)-
1080{-
1081 Scope scope(b);-
1082 ScopedString s(scope, thisObject->toString(scope.engine));-
1083 if (!s
!sDescription
TRUEnever evaluated
FALSEevaluated 94 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| thisObject->isNullOrUndefined()
thisObject->is...lOrUndefined()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 86 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-94
1084 return
executed 8 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
scope.engine->throwTypeError();
executed 8 times by 1 test: return scope.engine->throwTypeError();
Executed by:
  • tst_ecmascripttests
8
1085-
1086 Scoped<StringIteratorObject> si(scope, scope.engine->memoryManager->allocate<StringIteratorObject>(s->d(), scope.engine));-
1087 return
executed 86 times by 1 test: return si->asReturnedValue();
Executed by:
  • tst_ecmascripttests
si->asReturnedValue();
executed 86 times by 1 test: return si->asReturnedValue();
Executed by:
  • tst_ecmascripttests
86
1088}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0