MCPcopy
hub / github.com/tinygo-org/tinygo / checkOutputData

Function checkOutputData

main_test.go:893–902  ·  view source on GitHub ↗
(t *testing.T, expectedOutput, actual []byte)

Source from the content-addressed store, hash-verified

891}
892
893func checkOutputData(t *testing.T, expectedOutput, actual []byte) {
894 t.Helper()
895 expectedOutput = bytes.ReplaceAll(expectedOutput, []byte("\r\n"), []byte("\n"))
896 actual = bytes.ReplaceAll(actual, []byte("\r\n"), []byte("\n"))
897
898 if !bytes.Equal(actual, expectedOutput) {
899 t.Errorf("output did not match (expected %d bytes, got %d bytes):", len(expectedOutput), len(actual))
900 t.Error(string(Diff("expected", expectedOutput, "actual", actual)))
901 }
902}
903
904func TestTest(t *testing.T) {
905 t.Parallel()

Callers 2

TestWasmExitFunction · 0.85
checkOutputFunction · 0.85

Calls 5

DiffFunction · 0.85
HelperMethod · 0.65
ErrorfMethod · 0.65
ErrorMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected