@@ -36,6 +36,11 @@ public class RANSInteropTest extends HtsjdkTest {
36
36
public static final String COMPRESSED_RANS4X8_DIR = "r4x8" ;
37
37
public static final String COMPRESSED_RANSNX16_DIR = "r4x16" ;
38
38
39
+ private RANSEncode rans4x8Encoder = new RANS4x8Encode ();
40
+ private RANSDecode rans4x8Decoder = new RANS4x8Decode ();
41
+ private RANSNx16Encode ransNx16Encoder = new RANSNx16Encode ();
42
+ private RANSNx16Decode ransNx16Decoder = new RANSNx16Decode ();
43
+
39
44
// enumerates the different flag combinations
40
45
public Object [][] get4x8RoundTripTestCases () throws IOException {
41
46
@@ -50,8 +55,8 @@ public Object[][] get4x8RoundTripTestCases() throws IOException {
50
55
.forEach (path ->
51
56
rans4x8ParamsOrderList .stream ().map (rans4x8ParamsOrder -> new Object []{
52
57
path ,
53
- new RANS4x8Encode () ,
54
- new RANS4x8Decode () ,
58
+ rans4x8Encoder ,
59
+ rans4x8Decoder ,
55
60
new RANS4x8Params (rans4x8ParamsOrder )
56
61
}).forEach (testCases ::add ));
57
62
return testCases .toArray (new Object [][]{});
@@ -83,8 +88,8 @@ public Object[][] getNx16RoundTripTestCases() throws IOException {
83
88
.forEach (path ->
84
89
ransNx16ParamsFormatFlagList .stream ().map (ransNx16ParamsFormatFlag -> new Object []{
85
90
path ,
86
- new RANSNx16Encode () ,
87
- new RANSNx16Decode () ,
91
+ ransNx16Encoder ,
92
+ ransNx16Decoder ,
88
93
new RANSNx16Params (ransNx16ParamsFormatFlag )
89
94
}).forEach (testCases ::add ));
90
95
return testCases .toArray (new Object [][]{});
@@ -101,7 +106,7 @@ public Object[][] get4x8DecodeOnlyTestCases() throws IOException {
101
106
Object [] objects = new Object []{
102
107
path ,
103
108
CRAMInteropTestUtils .getUnCompressedFilePath (path ),
104
- new RANS4x8Decode ()
109
+ rans4x8Decoder
105
110
};
106
111
testCases .add (objects );
107
112
}
@@ -119,7 +124,7 @@ public Object[][] getNx16DecodeOnlyTestCases() throws IOException {
119
124
Object [] objects = new Object []{
120
125
path ,
121
126
CRAMInteropTestUtils .getUnCompressedFilePath (path ),
122
- new RANSNx16Decode ()
127
+ ransNx16Decoder
123
128
};
124
129
testCases .add (objects );
125
130
}
@@ -148,6 +153,7 @@ public Object[][] getDecodeOnlyTestCases() throws IOException {
148
153
149
154
@ Test (
150
155
dataProvider = "roundTripTestCases" ,
156
+ enabled = false ,
151
157
description = "Roundtrip using htsjdk RANS. Compare the output with the original file" )
152
158
public void testRANSRoundTrip (
153
159
final Path uncompressedFilePath ,
@@ -175,6 +181,7 @@ public void testRANSRoundTrip(
175
181
176
182
@ Test (
177
183
dataProvider = "decodeOnlyTestCases" ,
184
+ enabled = false ,
178
185
description = "Uncompress the existing compressed file using htsjdk RANS and compare it with the original file." )
179
186
public void testDecodeOnly (
180
187
final Path compressedFilePath ,
0 commit comments