(t *testing.T)
| 167 | } |
| 168 | |
| 169 | func TestOperationInputs(t *testing.T) { |
| 170 | g := NewGraph() |
| 171 | x, err := Placeholder(g, "x", Float) |
| 172 | if err != nil { |
| 173 | t.Fatal(err) |
| 174 | } |
| 175 | y, err := Placeholder(g, "y", Float) |
| 176 | if err != nil { |
| 177 | t.Fatal(err) |
| 178 | } |
| 179 | add, err := Add(g, "add", x, y) |
| 180 | if err != nil { |
| 181 | t.Fatal(err) |
| 182 | } |
| 183 | addOp := add.Op |
| 184 | |
| 185 | if out := addOp.NumInputs(); out != 2 { |
| 186 | t.Fatalf("Got %d inputs, wanted 2", out) |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | func TestOperationConsumers(t *testing.T) { |
| 191 | g := NewGraph() |
nothing calls this directly
no test coverage detected