test/Image2.rb in rmagick-2.13.3 vs test/Image2.rb in rmagick-2.13.4
- old
+ new
@@ -122,11 +122,11 @@
assert_raise(ArgumentError) { @img.convolve }
assert_raise(ArgumentError) { @img.convolve(order) }
assert_raise(IndexError) { @img.convolve(5, kernel) }
assert_raise(IndexError) { @img.convolve(order, "x") }
assert_raise(TypeError) { @img.convolve(3, [1.0, 1.0, 1.0, 1.0, 'x', 1.0, 1.0, 1.0, 1.0]) }
- assert_raise(Magick::ImageMagickError) { @img.convolve(2, [1.0, 1.0, 1.0, 1.0]) }
+ assert_raise(Magick::ImageMagickError) { @img.convolve(-1, [1.0, 1.0, 1.0, 1.0]) }
end
def test_convolve_channel
assert_raise(ArgumentError) { @img.convolve_channel }
assert_raise(ArgumentError) { @img.convolve_channel(3) }
@@ -442,11 +442,15 @@
@img.iptc_profile = "test profile"
assert_nothing_raised do
@img.each_profile do |name, value|
assert_equal("iptc", name)
# As of 6.3.1
- assert_equal("8BIM\004\004\000\000\000\000\001\340test profile", value)
+ if IM_VERSION < Gem::Version.new("6.6.4") || (IM_VERSION == Gem::Version.new("6.6.4") && IM_REVISION < Gem::Version.new("5"))
+ assert_equal("8BIM\004\004\000\000\000\000\001\340test profile", value)
+ else
+ assert_equal("test profile", value)
+ end
end
end
end
def test_edge
@@ -580,10 +584,10 @@
res = @img.export_pixels_to_str(0, 0, 10, 10, "I", Magick::IntegerPixel)
assert_equal(10*10*4, res.length)
end
assert_nothing_raised do
res = @img.export_pixels_to_str(0, 0, 10, 10, "I", Magick::LongPixel)
- assert_equal(10*10*8, res.length)
+ assert_equal(10*10*[1].pack("L!").length, res.length)
end
assert_nothing_raised do
res = @img.export_pixels_to_str(0, 0, 10, 10, "I", Magick::FloatPixel)
assert_equal(10*10*4, res.length)
end