equal
deleted
inserted
replaced
20 |
20 |
21 assert_eq!(message(b"PING\n\n"), Ok((&b""[..], Ping))); |
21 assert_eq!(message(b"PING\n\n"), Ok((&b""[..], Ping))); |
22 assert_eq!(message(b"START_GAME\n\n"), Ok((&b""[..], StartGame))); |
22 assert_eq!(message(b"START_GAME\n\n"), Ok((&b""[..], StartGame))); |
23 assert_eq!( |
23 assert_eq!( |
24 message(b"NICK\nit's me\n\n"), |
24 message(b"NICK\nit's me\n\n"), |
25 Ok((&b""[..], Nick("it's me".to_string()))) |
25 Ok((&b""[..], Nick("it's me".to_string(), None))) |
26 ); |
26 ); |
27 assert_eq!(message(b"PROTO\n51\n\n"), Ok((&b""[..], Proto(51)))); |
27 assert_eq!(message(b"PROTO\n51\n\n"), Ok((&b""[..], Proto(51)))); |
28 assert_eq!( |
28 assert_eq!( |
29 message(b"QUIT\nbye-bye\n\n"), |
29 message(b"QUIT\nbye-bye\n\n"), |
30 Ok((&b""[..], Quit(Some("bye-bye".to_string())))) |
30 Ok((&b""[..], Quit(Some("bye-bye".to_string())))) |