Add float* tests for -0, +inf and -inf.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Fix some tests.

Some tests in test_emit_float have never used emit_float. It's my fault.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Add Encoder.emit_str.

str is encoded as one of the format in string format family defined in
proposal v5. Data are not null-terminated UTF-8 strings which might
contain U+0000 in the middle.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Add Encoder.emit_char.

char is encoded as a string containing a character.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Move tests to their home, test.rs.

... although `rustpkg test` is still unimplemented.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Build tests only if we're testing.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Just an matter of tastes.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Edit TODOs.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Refactor.

I've found that 16bit uint will break current implementation. I'll
revisit it when any target whose pointer size is 16 bits.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>