test/driver/native/test_conversions.rb in octave-ruby-1.0.4 vs test/driver/native/test_conversions.rb in octave-ruby-1.0.5

- old
+ new

@@ -67,9 +67,23 @@ matrix[1, 1] = nil assert_octave_and_ruby_equal matrix end + def test_should_convert_a_0x0_octave_matrix_to_an_empty_array + matrix = Octave::Matrix.new(0, 0) + + expected_array = [] + result = to_octave_to_ruby(matrix) + + assert_equal expected_array, result + assert_instance_of Array, result + end + + def test_should_convert_an_empty_ruby_array + assert_octave_and_ruby_equal [] + end + def test_should_convert_a_1xn_octave_matrix_to_an_array matrix = Octave::Matrix.new(1, 3) matrix[0, 0] = 1 matrix[0, 1] = 2 matrix[0, 2] = 3