Commit e1f795b2 authored by Josh Coalson's avatar Josh Coalson
Browse files

add some missing tests

parent 6fe72f72
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment