dave on Nostr: #[cfg(test)] mod tests { use super::*; #[test] fn test_common_char_functional() { let ...
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_common_char_functional() {
let str1 = "Hello";
let str2 = "World";
let expected_result = "lo";
assert_eq!(expected_result, common_char_functional(str1, str2));
}
}
Published at
2023-02-10 07:56:46Event JSON
{
"id": "e27362b207a77a3a9c877c384bab55de9a0f77aafb0802c8afcb8704712d60ff",
"pubkey": "5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2",
"created_at": 1676015806,
"kind": 1,
"tags": [
[
"e",
"cf6ec50761a809a533e32de590d94eacd78c544265a3f67e215836d468ad9df5",
"",
"root"
],
[
"e",
"e31fcf399de5b77f5cab7fa88d026454fc556d1476350e69b681834be3a00077",
"",
"reply"
],
[
"p",
"07df91ae471e765c996d5bd1f16be175c83eb2f6efdc5c9aa7503309dc7872ee"
],
[
"p",
"72c29c440a399fa8ecd16227d38aba96d57ac6e2b2bbde307c6fd2d8db6fe810"
]
],
"content": "#[cfg(test)]\n mod tests {\n use super::*;\n\n #[test]\n fn test_common_char_functional() {\n let str1 = \"Hello\";\n let str2 = \"World\";\n let expected_result = \"lo\";\n\n assert_eq!(expected_result, common_char_functional(str1, str2));\n }\n }",
"sig": "03c84bdf226ef7d765cb1c4cc921ca5b2e1eaa89e83e9b11c16b006c6ca55d37057ee67962f25f19133770e044cee707f265d8e4087e07fc9896e78eeebd756d"
}