mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
Fixed compilation of test_filter_flags.c, which was broken by
1dcecfb09b
.
This commit is contained in:
parent
c6ca26eef7
commit
3a62a5fb85
1 changed files with 8 additions and 8 deletions
|
@ -145,31 +145,31 @@ test_delta(void)
|
||||||
// Test 2
|
// Test 2
|
||||||
lzma_options_delta options = {
|
lzma_options_delta options = {
|
||||||
.type = LZMA_DELTA_TYPE_BYTE,
|
.type = LZMA_DELTA_TYPE_BYTE,
|
||||||
.distance = 0
|
.dist = 0
|
||||||
};
|
};
|
||||||
known_flags.options = &options;
|
known_flags.options = &options;
|
||||||
expect(encode(99));
|
expect(encode(99));
|
||||||
|
|
||||||
// Test 3
|
// Test 3
|
||||||
options.distance = LZMA_DELTA_DISTANCE_MIN;
|
options.dist = LZMA_DELTA_DIST_MIN;
|
||||||
expect(!encode(3));
|
expect(!encode(3));
|
||||||
expect(!decode(3));
|
expect(!decode(3));
|
||||||
expect(((lzma_options_delta *)(decoded_flags.options))
|
expect(((lzma_options_delta *)(decoded_flags.options))->dist
|
||||||
->distance == options.distance);
|
== options.dist);
|
||||||
|
|
||||||
free(decoded_flags.options);
|
free(decoded_flags.options);
|
||||||
|
|
||||||
// Test 4
|
// Test 4
|
||||||
options.distance = LZMA_DELTA_DISTANCE_MAX;
|
options.dist = LZMA_DELTA_DIST_MAX;
|
||||||
expect(!encode(3));
|
expect(!encode(3));
|
||||||
expect(!decode(3));
|
expect(!decode(3));
|
||||||
expect(((lzma_options_delta *)(decoded_flags.options))
|
expect(((lzma_options_delta *)(decoded_flags.options))->dist
|
||||||
->distance == options.distance);
|
== options.dist);
|
||||||
|
|
||||||
free(decoded_flags.options);
|
free(decoded_flags.options);
|
||||||
|
|
||||||
// Test 5
|
// Test 5
|
||||||
options.distance = LZMA_DELTA_DISTANCE_MAX + 1;
|
options.dist = LZMA_DELTA_DIST_MAX + 1;
|
||||||
expect(encode(99));
|
expect(encode(99));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue