Add tests for printing

Also removed the check for `dict_.empty()` as it is checked as an assertion
insied constructor.