search for: refute_nil

Displaying 3 results from an estimated 3 matches for "refute_nil".

2019 Jan 17
1
[hivex PATCH] ruby: improve test functions
Use better functions to check for proper values instead of assert: - refute_nil for non-null functions - assert_equal for checking equality Also, make sure that the parameters for assert_equal are correct: expected value, then got value. --- ruby/tests/tc_120_rlenvalue.rb | 4 ++-- ruby/tests/tc_130_special.rb | 12 ++++++------ ruby/tests/tc_200_write.rb | 4 ++-- r...
2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
....rb +++ b/ruby/t/tc_020_create.rb @@ -17,8 +17,8 @@ require File::join(File::dirname(__FILE__), 'test_helper') -class TestLoad < MiniTest::Unit::TestCase - def test_create +class Test020Create < MiniTest::Unit::TestCase + def test_020_create g = Guestfs::Guestfs.new() refute_nil (g) end diff --git a/ruby/t/tc_030_create_flags.rb b/ruby/t/tc_030_create_flags.rb index 405326f..c89d3ac 100644 --- a/ruby/t/tc_030_create_flags.rb +++ b/ruby/t/tc_030_create_flags.rb @@ -17,8 +17,8 @@ require File::join(File::dirname(__FILE__), 'test_helper') -class TestLoad <...
2016 Jun 07
3
[PATCH 1/2] ruby: Print exceptions thrown by event callbacks.
--- generator/ruby.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/generator/ruby.ml b/generator/ruby.ml index 97ccfdc..0f71ccc 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -404,15 +404,17 @@ event_callback_wrapper_wrapper (VALUE argvv) return Qnil; } +/* Callbacks aren't supposed to throw exceptions. We just print the + * exception on