Macro leetcode_test::leetcode_test
source · leetcode_test!() { /* proc-macro */ }
Expand description
Generate code from leetcode json
Example
leetcode_test!(
["Trie", "insert", "search"]
[[], ["apple"], ["apple"]]
[null, null, true]
)
this will be expaned to
let mut obj = Trie::new();
obj.insert("apple".to_owned());
assert_eq!(obj.search("apple".to_owned()), true);