Skip to content

Commit

Permalink
Convert a property test to an example
Browse files Browse the repository at this point in the history
It was flaky and not terribly useful as a property.
  • Loading branch information
camelpunch committed Dec 21, 2024
1 parent 52398e7 commit bd78892
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/mudbrick/stream_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ defmodule Mudbrick.StreamTest do
end
end

property "doesn't compress data when there's no saving" do
check all uncompressed <- string(:alphanumeric, max_length: 120), max_runs: 200 do
result =
Mudbrick.Stream.new(compress: true, data: uncompressed)
|> Mudbrick.Object.to_iodata()
|> IO.iodata_to_binary()
test "doesn't compress data when there's no saving" do
uncompressed = "1234567890abcdefghijklmnopqrstuvwxyz"

refute result =~ "FlateDecode"
end
result =
Mudbrick.Stream.new(compress: true, data: uncompressed)
|> Mudbrick.Object.to_iodata()
|> IO.iodata_to_binary()

refute result =~ "FlateDecode"
end

test "includes length and stream markers when serialised" do
Expand Down

0 comments on commit bd78892

Please sign in to comment.