add some missing tests

This commit is contained in:
Josh Coalson 2002-08-20 04:02:21 +00:00
parent 6fe72f7247
commit e1f795b213
2 changed files with 12 additions and 0 deletions

View File

@ -152,6 +152,10 @@ bool StreamEncoder::die(const char *msg) const
printf("FAILED");
printf(", state = %u (%s)\n", (unsigned)((::FLAC__StreamEncoderState)state), state.as_cstring());
if(state == ::FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR) {
FLAC::Decoder::Stream::State dstate = get_verify_decoder_state();
printf(" verify decoder state = %u (%s)\n", (unsigned)((::FLAC__StreamDecoderState)dstate), dstate.as_cstring());
}
return false;
}
@ -279,6 +283,10 @@ static bool test_stream_encoder()
FLAC::Encoder::Stream::State state = encoder->get_state();
printf("returned state = %u (%s)... OK\n", (unsigned)((::FLAC__StreamEncoderState)state), state.as_cstring());
printf("testing get_verify_decoder_state()... ");
FLAC::Decoder::Stream::State dstate = encoder->get_verify_decoder_state();
printf("returned state = %u (%s)... OK\n", (unsigned)((::FLAC__StreamDecoderState)dstate), dstate.as_cstring());
{
FLAC__uint64 absolute_sample;
unsigned frame_number;

View File

@ -41,6 +41,10 @@ static FLAC__bool die_s_(const char *msg, const FLAC__StreamEncoder *encoder)
printf("FAILED");
printf(", state = %u (%s)\n", (unsigned)state, FLAC__StreamEncoderStateString[state]);
if(state == FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR) {
FLAC__StreamDecoderState dstate = FLAC__stream_encoder_get_verify_decoder_state(encoder);
printf(" verify decoder state = %u (%s)\n", (unsigned)dstate, FLAC__StreamDecoderStateString[dstate]);
}
return false;
}