diff -r 6273f89ab13d -r a4d22f197bd2 gameServer2/src/protocol/mod.rs --- a/gameServer2/src/protocol/mod.rs Thu Jan 05 19:07:01 2017 +0300 +++ b/gameServer2/src/protocol/mod.rs Fri Jan 06 01:00:21 2017 +0300 @@ -4,6 +4,7 @@ mod messages; mod hwprotocol; +mod lexer; pub struct FrameDecoder { buf: netbuf::Buf, @@ -24,3 +25,9 @@ &self.buf[..] } } + +#[test] +fn testparser() { + assert_eq!(messages::HWProtocolMessage::Nick("hey".to_string()), + hwprotocol::parse_ProtocolMessage("NICK\nhey\n\n").unwrap()); +}