~loic.molinari/+junk/qtdeclarative-shadereffectsource-changes

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlecmascript/data/eval.qml

  • Committer: Loïc Molinari
  • Date: 2012-04-21 17:59:51 UTC
  • Revision ID: loic.molinari@canonical.com-20120421175951-bqx68caaf5zrp76l
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
QtObject {
 
4
    property bool test1: false;        
 
5
    property bool test2: false;        
 
6
    property bool test3: false;        
 
7
    property bool test4: false;        
 
8
    property bool test5: false;        
 
9
 
 
10
 
 
11
    property int a: 7
 
12
    property int b: 8
 
13
 
 
14
    Component.onCompleted: {
 
15
        var b = 9;
 
16
 
 
17
        test1 = (eval("a") == 7);
 
18
        test2 = (eval("b") == 9);
 
19
        try {
 
20
            eval("c");
 
21
        } catch(e) {
 
22
            test3 = true;
 
23
        }
 
24
        test4 = (eval("console") == console);
 
25
        test5 = (eval("Qt") == Qt);
 
26
    }
 
27
}