]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/test/java/org/rocksdb/CompressionOptionsTest.java
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / rocksdb / java / src / test / java / org / rocksdb / CompressionOptionsTest.java
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
5
6 package org.rocksdb;
7
8 import org.junit.Test;
9
10 import static org.assertj.core.api.Assertions.assertThat;
11
12 public class CompressionOptionsTest {
13
14 static {
15 RocksDB.loadLibrary();
16 }
17
18 @Test
19 public void windowBits() {
20 final int windowBits = 7;
21 try(final CompressionOptions opt = new CompressionOptions()) {
22 opt.setWindowBits(windowBits);
23 assertThat(opt.windowBits()).isEqualTo(windowBits);
24 }
25 }
26
27 @Test
28 public void level() {
29 final int level = 6;
30 try(final CompressionOptions opt = new CompressionOptions()) {
31 opt.setLevel(level);
32 assertThat(opt.level()).isEqualTo(level);
33 }
34 }
35
36 @Test
37 public void strategy() {
38 final int strategy = 2;
39 try(final CompressionOptions opt = new CompressionOptions()) {
40 opt.setStrategy(strategy);
41 assertThat(opt.strategy()).isEqualTo(strategy);
42 }
43 }
44
45 @Test
46 public void maxDictBytes() {
47 final int maxDictBytes = 999;
48 try(final CompressionOptions opt = new CompressionOptions()) {
49 opt.setMaxDictBytes(maxDictBytes);
50 assertThat(opt.maxDictBytes()).isEqualTo(maxDictBytes);
51 }
52 }
53 }