(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func TestToFloat64(t *testing.T) { |
| 85 | target := float64(102) |
| 86 | if target != toFloat64(int8(102)) { |
| 87 | t.Errorf("Expected 102") |
| 88 | } |
| 89 | if target != toFloat64(int(102)) { |
| 90 | t.Errorf("Expected 102") |
| 91 | } |
| 92 | if target != toFloat64(int32(102)) { |
| 93 | t.Errorf("Expected 102") |
| 94 | } |
| 95 | if target != toFloat64(int16(102)) { |
| 96 | t.Errorf("Expected 102") |
| 97 | } |
| 98 | if target != toFloat64(int64(102)) { |
| 99 | t.Errorf("Expected 102") |
| 100 | } |
| 101 | if target != toFloat64("102") { |
| 102 | t.Errorf("Expected 102") |
| 103 | } |
| 104 | if 0 != toFloat64("frankie") { |
| 105 | t.Errorf("Expected 0") |
| 106 | } |
| 107 | if target != toFloat64(uint16(102)) { |
| 108 | t.Errorf("Expected 102") |
| 109 | } |
| 110 | if target != toFloat64(uint64(102)) { |
| 111 | t.Errorf("Expected 102") |
| 112 | } |
| 113 | if 102.1234 != toFloat64(float64(102.1234)) { |
| 114 | t.Errorf("Expected 102.1234") |
| 115 | } |
| 116 | if 1 != toFloat64(true) { |
| 117 | t.Errorf("Expected 102") |
| 118 | } |
| 119 | } |
| 120 | func TestToInt64(t *testing.T) { |
| 121 | target := int64(102) |
| 122 | if target != toInt64(int8(102)) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…