aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-09-12 22:41:40 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-09-12 22:41:40 +0300
commit320601b2c7b08fc7da9da18d5bf7c3c1a189b080 (patch)
tree3846af51e6904d900e5cd8337baf0728a42a07fe /tests
parentSimplified debug/known_sizes.c to match the relaxed (diff)
downloadxz-320601b2c7b08fc7da9da18d5bf7c3c1a189b080.tar.xz
Improved the Stream Flags handling API.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stream_flags.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_stream_flags.c b/tests/test_stream_flags.c
index ead75501..abd0296d 100644
--- a/tests/test_stream_flags.c
+++ b/tests/test_stream_flags.c
@@ -28,7 +28,11 @@ static uint8_t buffer[LZMA_STREAM_HEADER_SIZE];
static bool
validate(void)
{
- return !lzma_stream_flags_equal(&known_flags, &decoded_flags);
+ // TODO: This could require the specific error type as an argument.
+ // We could also test that lzma_stream_flags_compare() gives
+ // the correct return values in different situations.
+ return lzma_stream_flags_compare(&known_flags, &decoded_flags)
+ != LZMA_OK;
}
@@ -44,7 +48,7 @@ test_header_decoder(lzma_ret expected_ret)
return false;
// Header doesn't have Backward Size, so make
- // lzma_stream_flags_equal() ignore it.
+ // lzma_stream_flags_compare() ignore it.
decoded_flags.backward_size = LZMA_VLI_VALUE_UNKNOWN;
return validate();
}