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

Function TestZeroShape

tensorflow/go/shape_test.go:70–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestZeroShape(t *testing.T) {
71 var s Shape
72 if s.NumDimensions() != -1 {
73 t.Error(s.NumDimensions())
74 }
75 if _, err := s.ToSlice(); err == nil {
76 t.Error("ToSlice() on a Shape of unknown number of dimensions should fail")
77 }
78 if s.IsFullySpecified() {
79 t.Error("Shape of unknown number of dimensions should not be fully specified")
80 }
81 if got, want := s.String(), "?"; got != want {
82 t.Errorf("Got %q, want %q", got, want)
83 }
84
85}

Callers

nothing calls this directly

Calls 5

NumDimensionsMethod · 0.95
ToSliceMethod · 0.95
IsFullySpecifiedMethod · 0.95
StringMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected