diff options
Diffstat (limited to 'Examples/test-suite/ruby/constover_runme.rb')
-rwxr-xr-x | Examples/test-suite/ruby/constover_runme.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Examples/test-suite/ruby/constover_runme.rb b/Examples/test-suite/ruby/constover_runme.rb new file mode 100755 index 000000000..04d516b75 --- /dev/null +++ b/Examples/test-suite/ruby/constover_runme.rb @@ -0,0 +1,44 @@ +require 'constover' + +error = 0 + +p = Constover.test("test") +if p != "test" + puts "test failed!" + error = 1 +end + +p = Constover.test_pconst("test") +if p != "test_pconst" + puts "test_pconst failed!" + error = 1 +end + +f = Constover::Foo.new +p = f.test("test") +if p != "test" + print "member-test failed!" + error = 1 +end + +p = f.test_pconst("test") +if p != "test_pconst" + print "member-test_pconst failed!" + error = 1 +end + +p = f.test_constm("test") +if p != "test_constmethod" + print "member-test_constm failed!" + error = 1 +end + +p = f.test_pconstm("test") +if p != "test_pconstmethod" + print "member-test_pconstm failed!" + error = 1 +end + +exit(error) + + |