-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: new coverage generation * fix: remove old files because tests were registered twice * chore: fix some tests and test the tests * wip: temporary comment this test * chore: coverage * feat: only cover the main package
- Loading branch information
1 parent
7f952f6
commit c917fc1
Showing
577 changed files
with
11,488 additions
and
994 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestAbs(t *testing.T) { | ||
mytest := NewTestAbs() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestAcosExample(t *testing.T) { | ||
mytest := NewTestAcosExample() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestAcos(t *testing.T) { | ||
mytest := NewTestAcos() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestAcoshExample(t *testing.T) { | ||
mytest := NewTestAcoshExample() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestAcosh(t *testing.T) { | ||
mytest := NewTestAcosh() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestAddBcast(t *testing.T) { | ||
mytest := NewTestAddBcast() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestAdd(t *testing.T) { | ||
mytest := NewTestAdd() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
backend/testbackend/onnx/onnx_test_argmax_default_axis_example_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package onnxtest | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/owulveryck/onnx-go/internal/pb-onnx" | ||
) | ||
|
||
func TestNewTestArgmaxDefaultAxisExample(t *testing.T) { | ||
mytest := NewTestArgmaxDefaultAxisExample() | ||
var model pb.ModelProto | ||
err := proto.Unmarshal(mytest.ModelB, &model) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if model.Graph == nil { | ||
t.Fatal("graph is nil") | ||
} | ||
if len(model.Graph.Input) != len(mytest.Input) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Input), len(mytest.Input)) | ||
} | ||
if len(model.Graph.Output) != len(mytest.ExpectedOutput) { | ||
t.Fatalf("invalid test: model has %v input, but test only provide %v", len(model.Graph.Output), len(mytest.ExpectedOutput)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.