summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvalue/testgen/data.txt
blob: 8e7026e544d823f2fb4b9be656055aa4de4c59c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Data set for QScriptValue autotest.

# Each line is a c++ code that should return a QScriptValue object.
# Lines that are empty or start with '#' will be ignored

QScriptValue()

#Unbound values
QScriptValue(QScriptValue::UndefinedValue)
QScriptValue(QScriptValue::NullValue)
QScriptValue(true)
QScriptValue(false)
QScriptValue(int(122))
QScriptValue(uint(124))
QScriptValue(0)
QScriptValue(0.0)
QScriptValue(123.0)
QScriptValue(6.37e-8)
QScriptValue(-6.37e-8)
QScriptValue(0x43211234)
QScriptValue(0x10000)
QScriptValue(0x10001)
QScriptValue(qSNaN())
QScriptValue(qQNaN())
QScriptValue(qInf())
QScriptValue(-qInf())
QScriptValue("NaN")
QScriptValue("Infinity")
QScriptValue("-Infinity")
QScriptValue("ciao")
QScriptValue(QString::fromLatin1("ciao"))
QScriptValue(QString(""))
QScriptValue(QString())
QScriptValue(QString("0"))
QScriptValue(QString("123"))
QScriptValue(QString("12.4"))

#Unbound values (bound to a null engine)
QScriptValue(0, QScriptValue::UndefinedValue)
QScriptValue(0, QScriptValue::NullValue)
QScriptValue(0, true)
QScriptValue(0, false)
QScriptValue(0, int(122))
QScriptValue(0, uint(124))
QScriptValue(0, 0)
QScriptValue(0, 0.0)
QScriptValue(0, 123.0)
QScriptValue(0, 6.37e-8)
QScriptValue(0, -6.37e-8)
QScriptValue(0, 0x43211234)
QScriptValue(0, 0x10000)
QScriptValue(0, 0x10001)
QScriptValue(0, qSNaN())
QScriptValue(0, qQNaN())
QScriptValue(0, qInf())
QScriptValue(0, -qInf())
QScriptValue(0, "NaN")
QScriptValue(0, "Infinity")
QScriptValue(0, "-Infinity")
QScriptValue(0, "ciao")
QScriptValue(0, QString::fromLatin1("ciao"))
QScriptValue(0, QString(""))
QScriptValue(0, QString())
QScriptValue(0, QString("0"))
QScriptValue(0, QString("123"))
QScriptValue(0, QString("12.3"))

#Bound values
QScriptValue(engine, QScriptValue::UndefinedValue)
QScriptValue(engine, QScriptValue::NullValue)
QScriptValue(engine, true)
QScriptValue(engine, false)
QScriptValue(engine, int(122))
QScriptValue(engine, uint(124))
QScriptValue(engine, 0)
QScriptValue(engine, 0.0)
QScriptValue(engine, 123.0)
QScriptValue(engine, 6.37e-8)
QScriptValue(engine, -6.37e-8)
QScriptValue(engine, 0x43211234)
QScriptValue(engine, 0x10000)
QScriptValue(engine, 0x10001)
QScriptValue(engine, qSNaN())
QScriptValue(engine, qQNaN())
QScriptValue(engine, qInf())
QScriptValue(engine, -qInf())
QScriptValue(engine, "NaN")
QScriptValue(engine, "Infinity")
QScriptValue(engine, "-Infinity")
QScriptValue(engine, "ciao")
QScriptValue(engine, QString::fromLatin1("ciao"))
QScriptValue(engine, QString(""))
QScriptValue(engine, QString())
QScriptValue(engine, QString("0"))
QScriptValue(engine, QString("123"))
QScriptValue(engine, QString("1.23"))

# evaluate
engine->evaluate("[]")
engine->evaluate("{}")
engine->evaluate("Object.prototype")
engine->evaluate("Date.prototype")
engine->evaluate("Array.prototype")
engine->evaluate("Function.prototype")
engine->evaluate("Error.prototype")
engine->evaluate("Object")
engine->evaluate("Array")
engine->evaluate("Number")
engine->evaluate("Function")
engine->evaluate("(function() { return 1; })")
engine->evaluate("(function() { return 'ciao'; })")
engine->evaluate("(function() { throw new Error('foo'); })")
engine->evaluate("/foo/")
engine->evaluate("new Object()")
engine->evaluate("new Array()")
engine->evaluate("new Error()")