complited testing Buffer and Lexer, add checking capacity of Buffer