AssertGoldenString asserts that the given string matches the contents of the given file.
(t TestingT, actual, filename string)
| 41 | |
| 42 | // AssertGoldenString asserts that the given string matches the contents of the given file. |
| 43 | func AssertGoldenString(t TestingT, actual, filename string) { |
| 44 | t.Helper() |
| 45 | |
| 46 | if err := compare([]byte(actual), path(filename)); err != nil { |
| 47 | t.Fatalf("%v\n", err) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // AssertGoldenFile asserts that the content of the actual file matches the contents of the expected file |
| 52 | func AssertGoldenFile(t TestingT, actualFileName string, expectedFilename string) { |
searching dependent graphs…