MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TestOperationLifetime

Function TestOperationLifetime

tensorflow/go/operation_test.go:40–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestOperationLifetime(t *testing.T) {
41 // Ensure that the Graph is not garbage collected while the program
42 // still has access to the Operation.
43 op, err := createGraphAndOp()
44 if err != nil {
45 t.Fatal(err)
46 }
47 forceGC()
48 if got, want := op.Name(), "my_placeholder"; got != want {
49 t.Errorf("Got '%s', want '%s'", got, want)
50 }
51 if got, want := op.Type(), "Placeholder"; got != want {
52 t.Errorf("Got '%s', want '%s'", got, want)
53 }
54}
55
56func TestOperationOutputListSize(t *testing.T) {
57 graph := NewGraph()

Callers

nothing calls this directly

Calls 4

createGraphAndOpFunction · 0.85
forceGCFunction · 0.85
NameMethod · 0.45
TypeMethod · 0.45

Tested by

no test coverage detected