summaryrefslogtreecommitdiff
path: root/tests/manual/debugger/python/math.py
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-08-23 12:47:30 +0200
committerhjk <qthjk@ovi.com>2011-08-24 13:54:34 +0200
commit051545a499ea402f8444e000529818db3d61a409 (patch)
tree3eb0e4b5d4542d59eb20156548a9795ab542d7b2 /tests/manual/debugger/python/math.py
parent3a2c3483447a2efbb11031dd9f9100d22d983345 (diff)
downloadqt-creator-051545a499ea402f8444e000529818db3d61a409.tar.gz
debugger: rename manual tests from 'gdbdebugger' to 'debugger'
Change-Id: I0f92b03fa99d81fd58d92eb8a0f3dfe3b1cbf7b4 Reviewed-on: http://codereview.qt.nokia.com/3402 Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'tests/manual/debugger/python/math.py')
-rw-r--r--tests/manual/debugger/python/math.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/manual/debugger/python/math.py b/tests/manual/debugger/python/math.py
new file mode 100644
index 0000000000..0bd111e386
--- /dev/null
+++ b/tests/manual/debugger/python/math.py
@@ -0,0 +1,54 @@
+
+import sys
+from PyQt4 import QtGui
+
+
+
+def testApp():
+ app = QtGui.QApplication(sys.argv)
+
+ class MessageBox(QtGui.QWidget):
+ def __init__(self, parent=None):
+ QtGui.QWidget.__init__(self, parent)
+ self.setGeometry(200, 200, 300, 200)
+ self.setWindowTitle("A Test Box")
+
+ messageBox = MessageBox()
+ messageBox.show()
+
+ widget = QtGui.QWidget()
+ widget.resize(200, 200)
+ widget.show()
+
+ return app.exec_()
+
+
+def testMath():
+ def square(a):
+ x = a * a
+ return a
+
+ def cube(a):
+ l = [1, 2, 4]
+ t = (1, 2, 3)
+ d = {1: 'one', 2: 'two', 'three': 3}
+ s = u'unixcode'
+ x = xrange(1, 10)
+ b = buffer("xxx")
+ x = square(a)
+ x = x * a
+ x = x + 1
+ x = x - 1
+ return x
+
+ print cube(3)
+ print cube(4)
+ print cube(5)
+
+def main():
+ testMath()
+ #testApp()
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(main())