summaryrefslogtreecommitdiff
path: root/test/zlib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-24 22:07:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-24 22:07:10 +0900
commit1cce4303247110d94eab8326f187a2a80130b324 (patch)
tree23e5e4ee5ed08f686da94367e8c8f02c3880b6e6 /test/zlib
parent538ba984c8e3c6ae33cbc87a5090725af24caf2e (diff)
Suppress deflateParams() warnings
Diffstat (limited to 'test/zlib')
-rw-r--r--test/zlib/test_zlib.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index fc2ab50..bc8b976 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -199,10 +199,10 @@ if defined? Zlib
z = Zlib::Deflate.new
s = z.deflate("foo", Zlib::FULL_FLUSH)
z.avail_out = 0
- z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED)
+ EnvUtil.suppress_warning {z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED)}
s << z.deflate("bar", Zlib::FULL_FLUSH)
z.avail_out = 0
- z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY)
+ EnvUtil.suppress_warning {z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY)}
s << z.deflate("baz", Zlib::FINISH)
assert_equal("foobarbaz", Zlib::Inflate.inflate(s))
@@ -415,10 +415,10 @@ if defined? Zlib
z = Zlib::Deflate.new
s = z.deflate("foo" * 1000, Zlib::FULL_FLUSH)
z.avail_out = 0
- z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED)
+ EnvUtil.suppress_warning {z.params(Zlib::NO_COMPRESSION, Zlib::FILTERED)}
s << z.deflate("bar" * 1000, Zlib::FULL_FLUSH)
z.avail_out = 0
- z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY)
+ EnvUtil.suppress_warning {z.params(Zlib::BEST_COMPRESSION, Zlib::HUFFMAN_ONLY)}
s << z.deflate("baz" * 1000, Zlib::FINISH)
z = Zlib::Inflate.new