Added more tests.

[SVN r86480]
Fixed compilation with gcc.

[SVN r86481]