MCPcopy Index your code
hub / github.com/gopherdata/gophernotes / assertMsgTypeEquals

Function assertMsgTypeEquals

kernel_test.go:544–550  ·  view source on GitHub ↗

assertMsgTypeEquals is a test helper that fails the test if the message header's MsgType is not the expectedType.

(t *testing.T, msg ComposedMsg, expectedType string)

Source from the content-addressed store, hash-verified

542// assertMsgTypeEquals is a test helper that fails the test if the message header's MsgType is not the
543// expectedType.
544func assertMsgTypeEquals(t *testing.T, msg ComposedMsg, expectedType string) {
545 t.Helper()
546
547 if msg.Header.MsgType != expectedType {
548 t.Fatalf("\t%s Expected message of type '%s' but was '%s'", failure, expectedType, msg.Header.MsgType)
549 }
550}
551
552// getMsgContentAsJSONObject is a test helper that fails the rest if the message content is not a
553// map[string]interface{} and returns the content as a map[string]interface{} if it is of the correct type.

Callers 2

performJupyterRequestMethod · 0.85
executeCodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected