Skip to content

Commit

Permalink
Remove duplicate tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpallant authored and listochkin committed Jul 26, 2023
1 parent 43a9507 commit 84761fa
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions exercise-solutions/simple-db/step4a/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,4 @@ mod tests {
let expected = Ok(Command::Command);
assert_eq!(result, expected);
}

#[cfg(test)]
mod tests {
use super::*;

// Tests placement of \n
#[test]
fn test_missing_nl() {
let line = "RETRIEVE";
let result: Result<Command, Error> = parse(line);
let expected = Err(Error::IncompleteMessage);
assert_eq!(result, expected);
}
#[test]
fn test_trailing_data() {
let line = "PUBLISH The message\n is wrong \n";
let result: Result<Command, Error> = parse(line);
let expected = Err(Error::TrailingData);
assert_eq!(result, expected);
}
}
}

0 comments on commit 84761fa

Please sign in to comment.