(b *testing.B)
| 172 | } |
| 173 | |
| 174 | func BenchmarkDecimal_Sub_different_precision(b *testing.B) { |
| 175 | d1 := NewFromFloat(1000.123) |
| 176 | d2 := NewFromFloat(500).Mul(NewFromFloat(0.12)) |
| 177 | |
| 178 | b.ReportAllocs() |
| 179 | b.StartTimer() |
| 180 | for i := 0; i < b.N; i++ { |
| 181 | d1.Sub(d2) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | func BenchmarkDecimal_Add_same_precision(b *testing.B) { |
| 186 | d1 := NewFromFloat(1000.123) |
nothing calls this directly
no test coverage detected
searching dependent graphs…