]>
git.saurik.com Git - apple/javascriptcore.git/blob - qt/tests/qscriptvalue/tst_qscriptvalue_generated_init.cpp
2 Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 /****************************************************************************
21 *************** This file has been generated. DO NOT MODIFY! ****************
22 ****************************************************************************/
24 #include "tst_qscriptvalue.h"
27 QPair
<QString
, QScriptValue
> tst_QScriptValue::initScriptValues(uint idx
)
29 QScriptEngine
* engine
= m_engine
;
31 case 0: return QPair
<QString
, QScriptValue
>("QScriptValue()", QScriptValue());
32 case 1: return QPair
<QString
, QScriptValue
>("QScriptValue(QScriptValue::UndefinedValue)", QScriptValue(QScriptValue::UndefinedValue
));
33 case 2: return QPair
<QString
, QScriptValue
>("QScriptValue(QScriptValue::NullValue)", QScriptValue(QScriptValue::NullValue
));
34 case 3: return QPair
<QString
, QScriptValue
>("QScriptValue(true)", QScriptValue(true));
35 case 4: return QPair
<QString
, QScriptValue
>("QScriptValue(false)", QScriptValue(false));
36 case 5: return QPair
<QString
, QScriptValue
>("QScriptValue(int(122))", QScriptValue(int(122)));
37 case 6: return QPair
<QString
, QScriptValue
>("QScriptValue(uint(124))", QScriptValue(uint(124)));
38 case 7: return QPair
<QString
, QScriptValue
>("QScriptValue(0)", QScriptValue(0));
39 case 8: return QPair
<QString
, QScriptValue
>("QScriptValue(0.0)", QScriptValue(0.0));
40 case 9: return QPair
<QString
, QScriptValue
>("QScriptValue(123.0)", QScriptValue(123.0));
41 case 10: return QPair
<QString
, QScriptValue
>("QScriptValue(6.37e-8)", QScriptValue(6.37e-8));
42 case 11: return QPair
<QString
, QScriptValue
>("QScriptValue(-6.37e-8)", QScriptValue(-6.37e-8));
43 case 12: return QPair
<QString
, QScriptValue
>("QScriptValue(0x43211234)", QScriptValue(0x43211234));
44 case 13: return QPair
<QString
, QScriptValue
>("QScriptValue(0x10000)", QScriptValue(0x10000));
45 case 14: return QPair
<QString
, QScriptValue
>("QScriptValue(0x10001)", QScriptValue(0x10001));
46 case 15: return QPair
<QString
, QScriptValue
>("QScriptValue(qSNaN())", QScriptValue(qSNaN()));
47 case 16: return QPair
<QString
, QScriptValue
>("QScriptValue(qQNaN())", QScriptValue(qQNaN()));
48 case 17: return QPair
<QString
, QScriptValue
>("QScriptValue(qInf())", QScriptValue(qInf()));
49 case 18: return QPair
<QString
, QScriptValue
>("QScriptValue(-qInf())", QScriptValue(-qInf()));
50 case 19: return QPair
<QString
, QScriptValue
>("QScriptValue(\"NaN\")", QScriptValue("NaN"));
51 case 20: return QPair
<QString
, QScriptValue
>("QScriptValue(\"Infinity\")", QScriptValue("Infinity"));
52 case 21: return QPair
<QString
, QScriptValue
>("QScriptValue(\"-Infinity\")", QScriptValue("-Infinity"));
53 case 22: return QPair
<QString
, QScriptValue
>("QScriptValue(\"ciao\")", QScriptValue("ciao"));
54 case 23: return QPair
<QString
, QScriptValue
>("QScriptValue(QString::fromLatin1(\"ciao\"))", QScriptValue(QString::fromLatin1("ciao")));
55 case 24: return QPair
<QString
, QScriptValue
>("QScriptValue(QString(\"\"))", QScriptValue(QString("")));
56 case 25: return QPair
<QString
, QScriptValue
>("QScriptValue(QString())", QScriptValue(QString()));
57 case 26: return QPair
<QString
, QScriptValue
>("QScriptValue(QString(\"0\"))", QScriptValue(QString("0")));
58 case 27: return QPair
<QString
, QScriptValue
>("QScriptValue(QString(\"123\"))", QScriptValue(QString("123")));
59 case 28: return QPair
<QString
, QScriptValue
>("QScriptValue(QString(\"12.4\"))", QScriptValue(QString("12.4")));
60 case 29: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QScriptValue::UndefinedValue)", QScriptValue(0, QScriptValue::UndefinedValue
));
61 case 30: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QScriptValue::NullValue)", QScriptValue(0, QScriptValue::NullValue
));
62 case 31: return QPair
<QString
, QScriptValue
>("QScriptValue(0, true)", QScriptValue(0, true));
63 case 32: return QPair
<QString
, QScriptValue
>("QScriptValue(0, false)", QScriptValue(0, false));
64 case 33: return QPair
<QString
, QScriptValue
>("QScriptValue(0, int(122))", QScriptValue(0, int(122)));
65 case 34: return QPair
<QString
, QScriptValue
>("QScriptValue(0, uint(124))", QScriptValue(0, uint(124)));
66 case 35: return QPair
<QString
, QScriptValue
>("QScriptValue(0, 0)", QScriptValue(0, 0));
67 case 36: return QPair
<QString
, QScriptValue
>("QScriptValue(0, 0.0)", QScriptValue(0, 0.0));
68 case 37: return QPair
<QString
, QScriptValue
>("QScriptValue(0, 123.0)", QScriptValue(0, 123.0));
69 case 38: return QPair
<QString
, QScriptValue
>("QScriptValue(0, 6.37e-8)", QScriptValue(0, 6.37e-8));
70 case 39: return QPair
<QString
, QScriptValue
>("QScriptValue(0, -6.37e-8)", QScriptValue(0, -6.37e-8));
71 case 40: return QPair
<QString
, QScriptValue
>("QScriptValue(0, 0x43211234)", QScriptValue(0, 0x43211234));
72 case 41: return QPair
<QString
, QScriptValue
>("QScriptValue(0, 0x10000)", QScriptValue(0, 0x10000));
73 case 42: return QPair
<QString
, QScriptValue
>("QScriptValue(0, 0x10001)", QScriptValue(0, 0x10001));
74 case 43: return QPair
<QString
, QScriptValue
>("QScriptValue(0, qSNaN())", QScriptValue(0, qSNaN()));
75 case 44: return QPair
<QString
, QScriptValue
>("QScriptValue(0, qQNaN())", QScriptValue(0, qQNaN()));
76 case 45: return QPair
<QString
, QScriptValue
>("QScriptValue(0, qInf())", QScriptValue(0, qInf()));
77 case 46: return QPair
<QString
, QScriptValue
>("QScriptValue(0, -qInf())", QScriptValue(0, -qInf()));
78 case 47: return QPair
<QString
, QScriptValue
>("QScriptValue(0, \"NaN\")", QScriptValue(0, "NaN"));
79 case 48: return QPair
<QString
, QScriptValue
>("QScriptValue(0, \"Infinity\")", QScriptValue(0, "Infinity"));
80 case 49: return QPair
<QString
, QScriptValue
>("QScriptValue(0, \"-Infinity\")", QScriptValue(0, "-Infinity"));
81 case 50: return QPair
<QString
, QScriptValue
>("QScriptValue(0, \"ciao\")", QScriptValue(0, "ciao"));
82 case 51: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QString::fromLatin1(\"ciao\"))", QScriptValue(0, QString::fromLatin1("ciao")));
83 case 52: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QString(\"\"))", QScriptValue(0, QString("")));
84 case 53: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QString())", QScriptValue(0, QString()));
85 case 54: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QString(\"0\"))", QScriptValue(0, QString("0")));
86 case 55: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QString(\"123\"))", QScriptValue(0, QString("123")));
87 case 56: return QPair
<QString
, QScriptValue
>("QScriptValue(0, QString(\"12.3\"))", QScriptValue(0, QString("12.3")));
88 case 57: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QScriptValue::UndefinedValue)", QScriptValue(engine
, QScriptValue::UndefinedValue
));
89 case 58: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QScriptValue::NullValue)", QScriptValue(engine
, QScriptValue::NullValue
));
90 case 59: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, true)", QScriptValue(engine
, true));
91 case 60: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, false)", QScriptValue(engine
, false));
92 case 61: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, int(122))", QScriptValue(engine
, int(122)));
93 case 62: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, uint(124))", QScriptValue(engine
, uint(124)));
94 case 63: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, 0)", QScriptValue(engine
, 0));
95 case 64: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, 0.0)", QScriptValue(engine
, 0.0));
96 case 65: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, 123.0)", QScriptValue(engine
, 123.0));
97 case 66: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, 6.37e-8)", QScriptValue(engine
, 6.37e-8));
98 case 67: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, -6.37e-8)", QScriptValue(engine
, -6.37e-8));
99 case 68: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, 0x43211234)", QScriptValue(engine
, 0x43211234));
100 case 69: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, 0x10000)", QScriptValue(engine
, 0x10000));
101 case 70: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, 0x10001)", QScriptValue(engine
, 0x10001));
102 case 71: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, qSNaN())", QScriptValue(engine
, qSNaN()));
103 case 72: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, qQNaN())", QScriptValue(engine
, qQNaN()));
104 case 73: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, qInf())", QScriptValue(engine
, qInf()));
105 case 74: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, -qInf())", QScriptValue(engine
, -qInf()));
106 case 75: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, \"NaN\")", QScriptValue(engine
, "NaN"));
107 case 76: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, \"Infinity\")", QScriptValue(engine
, "Infinity"));
108 case 77: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, \"-Infinity\")", QScriptValue(engine
, "-Infinity"));
109 case 78: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, \"ciao\")", QScriptValue(engine
, "ciao"));
110 case 79: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QString::fromLatin1(\"ciao\"))", QScriptValue(engine
, QString::fromLatin1("ciao")));
111 case 80: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QString(\"\"))", QScriptValue(engine
, QString("")));
112 case 81: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QString())", QScriptValue(engine
, QString()));
113 case 82: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QString(\"0\"))", QScriptValue(engine
, QString("0")));
114 case 83: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QString(\"123\"))", QScriptValue(engine
, QString("123")));
115 case 84: return QPair
<QString
, QScriptValue
>("QScriptValue(engine, QString(\"1.23\"))", QScriptValue(engine
, QString("1.23")));
116 case 85: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"[]\")", engine
->evaluate("[]"));
117 case 86: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"{}\")", engine
->evaluate("{}"));
118 case 87: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Object.prototype\")", engine
->evaluate("Object.prototype"));
119 case 88: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Date.prototype\")", engine
->evaluate("Date.prototype"));
120 case 89: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Array.prototype\")", engine
->evaluate("Array.prototype"));
121 case 90: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Function.prototype\")", engine
->evaluate("Function.prototype"));
122 case 91: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Error.prototype\")", engine
->evaluate("Error.prototype"));
123 case 92: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Object\")", engine
->evaluate("Object"));
124 case 93: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Array\")", engine
->evaluate("Array"));
125 case 94: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Number\")", engine
->evaluate("Number"));
126 case 95: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Function\")", engine
->evaluate("Function"));
127 case 96: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"(function() { return 1; })\")", engine
->evaluate("(function() { return 1; })"));
128 case 97: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"(function() { return 'ciao'; })\")", engine
->evaluate("(function() { return 'ciao'; })"));
129 case 98: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"(function() { throw new Error('foo'); })\")", engine
->evaluate("(function() { throw new Error('foo'); })"));
130 case 99: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"/foo/\")", engine
->evaluate("/foo/"));
131 case 100: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"new Object()\")", engine
->evaluate("new Object()"));
132 case 101: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"new Array()\")", engine
->evaluate("new Array()"));
133 case 102: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"new Error()\")", engine
->evaluate("new Error()"));
134 case 103: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"a = new Object(); a.foo = 22; a.foo\")", engine
->evaluate("a = new Object(); a.foo = 22; a.foo"));
135 case 104: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Undefined\")", engine
->evaluate("Undefined"));
136 case 105: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Null\")", engine
->evaluate("Null"));
137 case 106: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"True\")", engine
->evaluate("True"));
138 case 107: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"False\")", engine
->evaluate("False"));
139 case 108: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"undefined\")", engine
->evaluate("undefined"));
140 case 109: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"null\")", engine
->evaluate("null"));
141 case 110: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"true\")", engine
->evaluate("true"));
142 case 111: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"false\")", engine
->evaluate("false"));
143 case 112: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"122\")", engine
->evaluate("122"));
144 case 113: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"124\")", engine
->evaluate("124"));
145 case 114: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"0\")", engine
->evaluate("0"));
146 case 115: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"0.0\")", engine
->evaluate("0.0"));
147 case 116: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"123.0\")", engine
->evaluate("123.0"));
148 case 117: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"6.37e-8\")", engine
->evaluate("6.37e-8"));
149 case 118: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"-6.37e-8\")", engine
->evaluate("-6.37e-8"));
150 case 119: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"0x43211234\")", engine
->evaluate("0x43211234"));
151 case 120: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"0x10000\")", engine
->evaluate("0x10000"));
152 case 121: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"0x10001\")", engine
->evaluate("0x10001"));
153 case 122: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"NaN\")", engine
->evaluate("NaN"));
154 case 123: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"Infinity\")", engine
->evaluate("Infinity"));
155 case 124: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"-Infinity\")", engine
->evaluate("-Infinity"));
156 case 125: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"'ciao'\")", engine
->evaluate("'ciao'"));
157 case 126: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"''\")", engine
->evaluate("''"));
158 case 127: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"'0'\")", engine
->evaluate("'0'"));
159 case 128: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"'123'\")", engine
->evaluate("'123'"));
160 case 129: return QPair
<QString
, QScriptValue
>("engine->evaluate(\"'12.4'\")", engine
->evaluate("'12.4'"));
161 case 130: return QPair
<QString
, QScriptValue
>("engine->nullValue()", engine
->nullValue());
162 case 131: return QPair
<QString
, QScriptValue
>("engine->undefinedValue()", engine
->undefinedValue());
163 case 132: return QPair
<QString
, QScriptValue
>("engine->newObject()", engine
->newObject());
164 case 133: return QPair
<QString
, QScriptValue
>("engine->newArray()", engine
->newArray());
165 case 134: return QPair
<QString
, QScriptValue
>("engine->newArray(10)", engine
->newArray(10));
168 return qMakePair(QString(), QScriptValue());