add some missing tests
This commit is contained in:
parent
6fe72f7247
commit
e1f795b213
@ -152,6 +152,10 @@ bool StreamEncoder::die(const char *msg) const
|
|||||||
printf("FAILED");
|
printf("FAILED");
|
||||||
|
|
||||||
printf(", state = %u (%s)\n", (unsigned)((::FLAC__StreamEncoderState)state), state.as_cstring());
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
@ -279,6 +283,10 @@ static bool test_stream_encoder()
|
|||||||
FLAC::Encoder::Stream::State state = encoder->get_state();
|
FLAC::Encoder::Stream::State state = encoder->get_state();
|
||||||
printf("returned state = %u (%s)... OK\n", (unsigned)((::FLAC__StreamEncoderState)state), state.as_cstring());
|
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;
|
FLAC__uint64 absolute_sample;
|
||||||
unsigned frame_number;
|
unsigned frame_number;
|
||||||
|
@ -41,6 +41,10 @@ static FLAC__bool die_s_(const char *msg, const FLAC__StreamEncoder *encoder)
|
|||||||
printf("FAILED");
|
printf("FAILED");
|
||||||
|
|
||||||
printf(", state = %u (%s)\n", (unsigned)state, FLAC__StreamEncoderStateString[state]);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user