Browse Source

refactoring: use assert instead of assert_eq

main
fdai7375 2 years ago
committed by fdai7451
parent
commit
4fce1305f5
  1. 24
      src/builtins/mod.rs

24
src/builtins/mod.rs

@ -73,27 +73,27 @@ mod tests {
#[test]
fn test_is_builtin_cd() {
assert_eq!(is_builtin("cd"), true);
assert!(is_builtin("cd"));
}
#[test]
fn test_is_builtin_change_prompt() {
assert_eq!(is_builtin("change-prompt"), true);
assert!(is_builtin("change-prompt"));
}
#[test]
fn test_is_builtin_exit() {
assert_eq!(is_builtin("exit"), true);
assert!(is_builtin("exit"));
}
#[test]
fn test_is_builtin_fetch() {
assert_eq!(is_builtin("fetch"), true);
assert!(is_builtin("fetch"));
}
#[test]
fn test_is_builtin_help() {
assert_eq!(is_builtin("help"), true);
assert!(is_builtin("help"));
}
#[test]
@ -103,36 +103,36 @@ mod tests {
#[test]
fn test_is_builtin_ls() {
assert_eq!(is_builtin("ls"), true);
assert!(is_builtin("ls"));
}
#[test]
fn test_is_builtin_open() {
assert_eq!(is_builtin("open"), true);
assert!(is_builtin("open"));
}
#[test]
fn test_is_builtin_pwd() {
assert_eq!(is_builtin("pwd"), true);
assert!(is_builtin("pwd"));
}
#[test]
fn test_is_builtin_segfault() {
assert_eq!(is_builtin("segfault"), true);
assert!(is_builtin("segfault"));
}
#[test]
fn test_is_builtin_sus() {
assert_eq!(is_builtin("sus"), true);
assert!(is_builtin("sus"));
}
#[test]
fn test_is_builtin_quote() {
assert_eq!(is_builtin("quote"), true);
assert!(is_builtin("quote"));
}
#[test]
fn test_is_builtin_notabuiltin() {
assert_eq!(is_builtin("notabuiltin"), false)
assert!(!is_builtin("notabuiltin"))
}
}
Loading…
Cancel
Save