# 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()")

#other
engine->nullValue()
engine->undefinedValue()