MCPcopy Create free account
hub / github.com/cogentcore/core / assertAlmostEqual

Function assertAlmostEqual

texteditor/difflib/bytes/bytes_test.go:16–20  ·  view source on GitHub ↗
(t *testing.T, a, b float64, places int)

Source from the content-addressed store, hash-verified

14)
15
16func assertAlmostEqual(t *testing.T, a, b float64, places int) {
17 if math.Abs(a-b) > math.Pow10(-places) {
18 t.Errorf("%.7f != %.7f", a, b)
19 }
20}
21
22func assertEqual(t *testing.T, a, b interface{}) {
23 if !reflect.DeepEqual(a, b) {

Callers 2

TestWithAsciiOneInsertFunction · 0.70
TestWithAsciiOnDeleteFunction · 0.70

Calls 2

ErrorfMethod · 0.65
AbsMethod · 0.45

Tested by

no test coverage detected