MCPcopy
hub / github.com/d4l3k/go-pry / TestBasicIdent

Function TestBasicIdent

pry/interpreter_test.go:247–260  ·  view source on GitHub ↗

Selectors and Ident

(t *testing.T)

Source from the content-addressed store, hash-verified

245
246// Selectors and Ident
247func TestBasicIdent(t *testing.T) {
248 t.Parallel()
249
250 scope := NewScope()
251 scope.Set("a", 5)
252 out, err := scope.InterpretString(`a`)
253 if err != nil {
254 t.Error(err)
255 }
256 expected := 5
257 if !reflect.DeepEqual(expected, out) {
258 t.Errorf("Expected %#v got %#v.", expected, out)
259 }
260}
261func TestMissingBasicIdent(t *testing.T) {
262 t.Parallel()
263

Callers

nothing calls this directly

Calls 4

SetMethod · 0.95
InterpretStringMethod · 0.95
NewScopeFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected