MCPcopy Create free account
hub / github.com/Ainevsia/Leetcode-Rust / odd

Function odd

33. Search in Rotated Sorted Array/src/main.rs:83–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82 #[test]
83 fn odd() {
84 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 4), 0);
85 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 5), -1);
86 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 6), 1);
87 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 7), 2);
88 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 0), 3);
89 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 1), 4);
90 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 2), 5);
91 assert_eq!(Solution::search(vec![4,6,7,0,1,2,3], 3), 6);
92 }
93
94 #[test]
95 fn even_not_found() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected