Support all numeric type conversions (#102)

Fixes #101
This commit is contained in:
Cameron Moore
2016-09-20 02:04:39 -05:00
committed by Thomas Pelletier
parent 31055c2ff0
commit 67b7b944a8
2 changed files with 31 additions and 1 deletions
+10
View File
@@ -627,7 +627,17 @@ func TestToTomlValue(t *testing.T) {
Value interface{}
Expect string
}{
{int(1), "1"},
{int8(2), "2"},
{int16(3), "3"},
{int32(4), "4"},
{int64(12345), "12345"},
{uint(10), "10"},
{uint8(20), "20"},
{uint16(30), "30"},
{uint32(40), "40"},
{uint64(50), "50"},
{float32(12.456), "12.456"},
{float64(123.45), "123.45"},
{bool(true), "true"},
{"hello world", "\"hello world\""},