MCPcopy
hub / github.com/pterm/pterm / TestMapRangeToRange

Function TestMapRangeToRange

internal/map_range_to_range_test.go:10–15  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestMapRangeToRange(t *testing.T) {
11 testza.AssertEqual(t, 127, internal.MapRangeToRange(0, 100, 0, 255, 50))
12 testza.AssertEqual(t, 127, internal.MapRangeToRange(0, 400, 0, 255, 200))
13 testza.AssertEqual(t, 127, internal.MapRangeToRange(-200, 200, 0, 255, 0))
14 testza.AssertEqual(t, 127, internal.MapRangeToRange(0, 200.123, 0, 254.3, 100))
15}

Callers

nothing calls this directly

Calls 1

MapRangeToRangeFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…