summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/testcases/error_reporting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/examples/testcases/error_reporting.rb')
-rw-r--r--qtruby/rubylib/examples/testcases/error_reporting.rb85
1 files changed, 85 insertions, 0 deletions
diff --git a/qtruby/rubylib/examples/testcases/error_reporting.rb b/qtruby/rubylib/examples/testcases/error_reporting.rb
new file mode 100644
index 00000000..e2012447
--- /dev/null
+++ b/qtruby/rubylib/examples/testcases/error_reporting.rb
@@ -0,0 +1,85 @@
+require 'Qt'
+
+#### CRASH ###
+# param mismatch?
+class Bug1 < Qt::PushButton
+ def initialize(*k)
+ super(*k)
+ end
+ def Bug1.test
+ a = Qt::Application.new(ARGV)
+ w = Qt::VBox.new
+ hello = Bug1.new(a)
+ hello.resize(100, 30)
+ a.setMainWidget(w)
+ hello.show()
+ a.exec()
+ end
+end
+#Bug1.test
+
+
+#### MORE DEBUG INFO NEEDED ###
+# missing method
+class Bug2 < Qt::VBox
+ def initialize(*k)
+ super(*k)
+ end
+ def Bug2.test
+ a = Qt::Application.new(ARGV)
+ w = Bug2.new
+ a.setMainWidget(w)
+ w.show2()
+ a.exec()
+ end
+end
+#Bug2.test
+
+
+#### MORE DEBUG INFO NEEDED ###
+# missing prototype
+class Bug2a < Qt::VBox
+ def initialize(*k)
+ super(*k)
+ end
+ def Bug2a.test
+ a = Qt::Application.new(ARGV)
+ w = Bug2a.new
+ a.setMainWidget(w)
+ w.show(p)
+ a.exec()
+ end
+end
+Bug2a.test
+
+
+#### FIXED ###
+# no such constructor for PushButton
+class Bug3 < Qt::PushButton
+ def initialize
+ super
+ end
+ def Bug3.test
+ a = Qt::Application.new(ARGV)
+ hello = Bug3.new
+ hello.resize(100, 30)
+ a.setMainWidget(hello)
+ hello.show()
+ a.exec()
+ end
+end
+#Bug3.test
+
+
+#### FIXED ###
+# no *class* variable/method resize in PushButton
+class Bug4 < Qt::PushButton
+ def initialize
+ super
+ end
+ def Bug4.test
+ hello = Bug4
+ hello.resize(100, 30)
+ end
+end
+#Bug4.test