From 4fce1305f5b87ca4318d5e6611f1b367044670a7 Mon Sep 17 00:00:00 2001 From: fdai7375 Date: Thu, 2 Feb 2023 18:55:59 +0100 Subject: [PATCH] refactoring: use assert instead of assert_eq --- src/builtins/mod.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/builtins/mod.rs b/src/builtins/mod.rs index bb764dc..13a0966 100644 --- a/src/builtins/mod.rs +++ b/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")) } }