MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_git_commands_variants

Function test_git_commands_variants

atomic-cli/src/commands/git/mod.rs:181–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179
180 #[test]
181 fn test_git_commands_variants() {
182 fn check_variant(cmd: &GitCommands) -> &'static str {
183 match cmd {
184 GitCommands::Shim(_) => "shim",
185 GitCommands::Import(_) => "import",
186 GitCommands::Push(_) => "push",
187 GitCommands::Hooks(_) => "hooks",
188 }
189 }
190
191 let shim = Shim::default();
192 assert_eq!(check_variant(&GitCommands::Shim(shim)), "shim");
193
194 let import = Import::default();
195 assert_eq!(check_variant(&GitCommands::Import(import)), "import");
196
197 let push = Push::default();
198 assert_eq!(check_variant(&GitCommands::Push(push)), "push");
199 }
200}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected