MCPcopy Create free account
hub / github.com/Pallinder/go-randomdata / TestDecimal

Function TestDecimal

random_data_test.go:321–331  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

319}
320
321func TestDecimal(t *testing.T) {
322 d := Decimal(2, 4, 3)
323 if !(d >= 2 && d <= 4) {
324 t.Error("Invalid generate range")
325 }
326
327 ds := strings.Split(strconv.FormatFloat(d, 'f', 3, 64), ".")
328 if len(ds[1]) != 3 {
329 t.Error("Invalid floating point")
330 }
331}
332
333func TestDay(t *testing.T) {
334 t.Log("TestDay")

Callers

nothing calls this directly

Calls 1

DecimalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…