Skip to content

Commit

Permalink
test: add reference image for vips no-op processing
Browse files Browse the repository at this point in the history
It includes missing options and 360 degrees rotation which is effectively a no-op.

No significant visual difference noticed, mean average error normalised < 0.01 (0.00749727)
  • Loading branch information
knarewski committed Nov 20, 2024
1 parent 0a775e1 commit f501c7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions spec/morandi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
let(:reference_image_prefix) { processor_name == 'pixbuf' ? '' : processor_name }
subject(:process_image) { Morandi.process(file_arg, options, file_out, { 'processor' => processor_name }) }

describe 'when given an input without any options', vips_wip: processor_name == 'vips' do
describe 'when given an input without any options' do
it 'creates output' do
process_image
expect(File).to exist(file_out)
expect(file_out).to match_reference_image('plasma-no-op-output')
expect(file_out).to match_reference_image(reference_image_prefix, 'plasma-no-op-output')
end
end

Expand Down Expand Up @@ -138,12 +138,12 @@
end
end

context '360 degress', vips_wip: processor_name == 'vips' do
context '360 degrees' do
let(:angle) { 360 }

it 'does not perform any rotation' do
process_image
expect(file_out).to match_reference_image('plasma-no-op-output')
expect(file_out).to match_reference_image(reference_image_prefix, 'plasma-no-op-output')
end
end
end
Expand Down

0 comments on commit f501c7d

Please sign in to comment.