Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robot-name: remove redundant tests #1983

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions exercises/practice/robot-name/tests/robot-name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,12 @@ fn assert_name_matches_pattern(n: &str) {
);
}

fn assert_name_is_persistent(r: &robot::Robot) {
// The type system already proves this, but why not.
let n1 = r.name();
let n2 = r.name();
let n3 = r.name();
assert_eq!(n1, n2);
assert_eq!(n2, n3);
}

#[test]
fn name_should_match_expected_pattern() {
let r = robot::Robot::new();
assert_name_matches_pattern(r.name());
}

#[test]
#[ignore]
fn name_is_persistent() {
assert_name_is_persistent(&robot::Robot::new());
}

#[test]
#[ignore]
fn different_robots_have_different_names() {
Expand Down Expand Up @@ -63,14 +48,6 @@ fn new_name_should_match_expected_pattern() {
assert_name_matches_pattern(r.name());
}

#[test]
#[ignore]
fn new_name_is_persistent() {
let mut r = robot::Robot::new();
r.reset_name();
assert_name_is_persistent(&r);
}

#[test]
#[ignore]
fn new_name_is_different_from_old_name() {
Expand Down