Skip to content

Repeated tests on the codec library #2153

@jayrmotta

Description

@jayrmotta

I was exploring the library and when I got to the tests it caught my attention as the tests have different name but the exact same code.

#[test]
fn handshake_step_fails_if_state_is_not_initialized() {
let mut state = State::NotInitialized(32);
let actual = state.step_0().unwrap_err();
let expect = Error::NotInHandShakeState;
assert_eq!(actual, expect);
}
#[test]
fn handshake_step_fails_if_state_is_in_transport_mode() {
let mut state = State::NotInitialized(32);
let actual = state.step_0().unwrap_err();
let expect = Error::NotInHandShakeState;
assert_eq!(actual, expect);
}

Also the second test's code doesn't seem to match its name, so perhaps someone duplicated the first while creating the second and then forgot to actually implement the new test. Just a hypothesis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions