Add tests for tight encoding