/// Asserts that the response has status 416 Range Not Satisfiable and contains
/// an index out of bounds error message.
Asserts that the response has status 416 Range Not Satisfiable and contains
an index out of bounds error message.
Asserts that the response has status 416 Range Not Satisfiable and contains an index out of bounds error message .
fn assert_response_is_index_out_of_bounds(status_code: u16, body: Vec<u8>, msg_begin: StreamIndex) {
    assert_eq!(
        (
            416,
            format!(
                "Requested slice begin {} is outside of stream message bounds [{}, {})",
                msg_begin,
                STREAM_BEGIN,
                STREAM_BEGIN.get() + STREAM_COUNT
            )
        ),
        (status_code, String::from_utf8_lossy(body.as_slice()).into())
    );
}
fn assert_response_is_index_out_of_bounds ( status_code : u16 , body : Vec < u8 > , msg_begin : StreamIndex ) { assert_eq ! ( ( 416 format ( " " msg_begin STREAM_BEGIN STREAM_BEGIN get ( ) STREAM_COUNT ) ) ( status_code String from_utf8_lossy ( body as_slice ( ) ) into ( ) ) ) ; }
Asserts that the response has status 416 Range Not Satisfiable and contains
an index out of bounds error message.
Asserts that the response has status 416 Range Not Satisfiable and contains an index out of bounds error message .
status_code
u16
body
Vec<u8>
msg_begin
StreamIndex