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

Function checkOutput

main_test.go:884–891  ·  view source on GitHub ↗

Check whether the output of a test equals the expected output.

(t *testing.T, filename string, actual []byte)

Source from the content-addressed store, hash-verified

882
883// Check whether the output of a test equals the expected output.
884func checkOutput(t *testing.T, filename string, actual []byte) {
885 t.Helper()
886 expectedOutput, err := os.ReadFile(filename)
887 if err != nil {
888 t.Fatal("could not read output file:", err)
889 }
890 checkOutputData(t, expectedOutput, actual)
891}
892
893func checkOutputData(t *testing.T, expectedOutput, actual []byte) {
894 t.Helper()

Callers 4

runTestWithConfigFunction · 0.85
TestWasmExportFunction · 0.85
TestWasmFuncOfFunction · 0.85
TestWasmExportJSFunction · 0.85

Calls 3

checkOutputDataFunction · 0.85
HelperMethod · 0.65
FatalMethod · 0.65

Tested by

no test coverage detected