Skip to content

Commit

Permalink
removed system dependent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kpagacz committed Oct 22, 2023
1 parent 97c2509 commit bc12d7d
Showing 1 changed file with 1 addition and 52 deletions.
53 changes: 1 addition & 52 deletions src/infrastructure/cli_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,55 +63,4 @@ impl CliDisplay for PrivateLeaderboard {
}

#[cfg(test)]
mod tests {
use crate::domain::private_leaderboard::PrivateLeaderboardEntry;

use super::*;

#[test]
fn for_private_leaderboard() {
use SolvedParts;
let leaderboard = PrivateLeaderboard {
entries: vec![
PrivateLeaderboardEntry {
user: "user 1".to_owned(),
points: 1,
stars: vec![
SolvedParts::One,
SolvedParts::Both,
SolvedParts::None,
SolvedParts::One,
SolvedParts::Both,
SolvedParts::None,
SolvedParts::One,
SolvedParts::Both,
SolvedParts::None,
SolvedParts::One,
SolvedParts::Both,
SolvedParts::None,
],
},
PrivateLeaderboardEntry {
user: "user with a very long name".to_owned(),
points: 9999,
stars: vec![
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
SolvedParts::Both,
],
},
],
};

assert_eq!(" 111\n 123456789012\n1) 1 \u{1b}[37m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[2m*\u{1b}[0m\u{1b}[37m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[2m*\u{1b}[0m\u{1b}[37m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[2m*\u{1b}[0m\u{1b}[37m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[2m*\u{1b}[0m user 1\n2)9999 \u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m\u{1b}[33m*\u{1b}[0m user with a very long name", leaderboard.cli_fmt(&Configuration::new()));
}
}
mod tests {}

0 comments on commit bc12d7d

Please sign in to comment.