This commit is contained in:
Simon Gardling
2023-03-24 10:33:01 -04:00
parent 592a67a304
commit 3d1260ec5f
7 changed files with 35 additions and 52 deletions

View File

@@ -281,12 +281,12 @@ fn get_last_term() {
#[test]
fn hint_accessor() {
assert_eq!(Hint::Single("hint").many(), None);
assert_eq!(Hint::Single("hint").single(), Some(&"hint"));
assert_eq!(Hint::Single("hint").single(), Some("hint"));
assert_eq!(Hint::Many(&["hint", "hint2"]).single(), None);
assert_eq!(
Hint::Many(&["hint", "hint2"]).many(),
Some(&["hint", "hint2"].as_slice())
Some(["hint", "hint2"].as_slice())
);
assert_eq!(Hint::None.single(), None);