A toolkit with common assertions and mocks that plays nicely with the standard library
97 matches across 1 category. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | .ci.ghactions.sh | 1 | #!/usr/bin/env bash |
| LOW | doc.go | 1 | // Module testify is a set of packages that provide many tools for testifying that your code will behave as you intend. |
| LOW | mock/doc.go | 1 | // Package mock provides a system by which it is possible to mock your objects |
| LOW | mock/doc.go | 21 | // |
| LOW | mock/doc.go | 41 | // |
| LOW | mock/mock.go | 201 | // |
| LOW | mock/mock.go | 281 | } |
| LOW | mock/mock.go | 781 | Arguments |
| LOW | mock/mock.go | 801 | // |
| LOW | mock/mock.go | 821 | } |
| LOW | mock/mock.go | 901 | return result[0].Bool() |
| LOW | require/doc.go | 1 | // Package require implements the same assertions as the assert package but |
| LOW | require/doc.go | 21 | // |
| LOW | require/require_forward.go | 101 | // |
| LOW | require/require_forward.go | 121 | // |
| LOW | require/require_forward.go | 161 | |
| LOW | require/require_forward.go | 181 | // } |
| LOW | require/require_forward.go | 341 | // The condition is considered "met" if no errors are raised in a tick. |
| LOW | require/require_forward.go | 361 | |
| LOW | require/require_forward.go | 501 | // |
| LOW | require/require_forward.go | 1161 | // NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified |
| LOW | require/require_forward.go | 1381 | // Both arguments must be pointer variables. Pointer variable sameness is |
| LOW | require/require_forward.go | 1561 | // Samef asserts that two pointers reference the same object. |
| LOW | require/require_forward.go | 1581 | // a.Subset([1, 2, 3], {1: "one", 2: "two"}) |
| LOW | require/require_forward.go | 1661 | h.Helper() |
| LOW | require/require_forward.go | 1681 | h.Helper() |
| LOW | require/require.go | 121 | // |
| LOW | require/require.go | 141 | } |
| LOW | require/require.go | 421 | // function can use the CollectT to call other assertions. |
| LOW | require/require.go | 441 | return |
| LOW | require/require.go | 2101 | if h, ok := t.(tHelper); ok { |
| LOW | internal/difflib/difflib.go | 1 | // Package difflib is a partial port of Python difflib module. |
| LOW | internal/difflib/difflib.go | 61 | // the longest contiguous matching subsequence that contains no "junk" |
| LOW | internal/difflib/difflib.go | 181 | _, ok := m.bJunk[s] |
| LOW | internal/difflib/difflib.go | 201 | // starts earliest in a, and of all those maximal matching blocks that |
| LOW | internal/difflib/difflib.go | 281 | |
| LOW | internal/difflib/difflib.go | 341 | nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) |
| LOW | internal/difflib/difflib_test.go | 141 | // and: |
| LOW | internal/spew/config.go | 21 | "fmt" |
| LOW | internal/spew/config.go | 41 | // set this to a tab with "\t" or perhaps two spaces with " ". |
| LOW | internal/spew/config.go | 61 | // with a pointer receiver could technically mutate the value, however, |
| LOW | internal/spew/config.go | 81 | // means it will print the results of invoking the custom error or Stringer |
| LOW | internal/spew/config.go | 101 | } |
| LOW | internal/spew/config.go | 121 | // the number of bytes written and any write error encountered. See |
| LOW | internal/spew/config.go | 141 | } |
| LOW | internal/spew/config.go | 161 | // fmt.Print(c.NewFormatter(a), c.NewFormatter(b)) |
| LOW | internal/spew/config.go | 181 | // NewFormatter for formatting details. |
| LOW | internal/spew/config.go | 201 | // Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were |
| LOW | internal/spew/dumpnocgo_test.go | 1 | // Copyright (c) 2013 Dave Collins <dave@davec.name> |
| LOW | internal/spew/dumpcgo_test.go | 1 | // Copyright (c) 2013-2016 Dave Collins <dave@davec.name> |
| LOW | internal/spew/bypass.go | 1 | // Copyright (c) 2015-2016 Dave Collins <dave@davec.name> |
| LOW | internal/spew/internalunsafe_test.go | 1 | // Copyright (c) 2013-2016 Dave Collins <dave@davec.name> |
| LOW | internal/spew/common.go | 81 | // type the passed reflect.Value represents and outputes the result to Writer w. |
| LOW | internal/spew/bypasssafe.go | 1 | // Copyright (c) 2015-2016 Dave Collins <dave@davec.name> |
| LOW | internal/spew/dump.go | 181 | // Try to use existing uint8 slices and fall back to converting |
| LOW | internal/spew/spew.go | 21 | "io" |
| LOW | internal/spew/spew.go | 41 | // This function is shorthand for the following syntax: |
| LOW | internal/spew/spew.go | 61 | // passed with a default Formatter interface returned by NewFormatter. See |
| LOW | internal/spew/spew.go | 81 | } |
| LOW | internal/spew/spew.go | 101 | // |
| 37 more matches not shown… | |||