[Unit tests] Fixed undefined behavior while testing string stream buffer.
[Code style] Styling.
[GCC 4.4.] Fix compatibility.