Skip to content

Commit

Permalink
Fix some more C# unit test issues.
Browse files Browse the repository at this point in the history
Ignore bin and obj directories under /csharp
  • Loading branch information
skottmckay committed Nov 29, 2018
1 parent f3fb1d5 commit 97dc949
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ onnxruntime_profile*.json
/docs/python/examples/*.onnx
/docs/python/examples/graph.*
/docs/python/*_LICENSE
/csharp/**/obj/
/csharp/**/bin/
6 changes: 3 additions & 3 deletions csharp/test/Microsoft.ML.OnnxRuntime.Tests/InferenceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ private void ThrowWrongInputName()
var container = new List<NamedOnnxValue>();
container.Add(NamedOnnxValue.CreateFromTensor<float>("wrong_name", tensor));
var ex = Assert.Throws<OnnxRuntimeException>(() => session.Run(container));
Assert.Equal("[ErrorCode:InvalidArgument] Missing required inputs: data_0 ", ex.Message);
session.Dispose();
Assert.Equal("[ErrorCode:InvalidArgument] Missing required inputs: data_0", ex.Message);
session.Dispose();
}

[Fact]
Expand Down Expand Up @@ -179,7 +179,7 @@ private void ThrowExtraInputs()
container.Add(nov1);
container.Add(nov2);
var ex = Assert.Throws<OnnxRuntimeException>(() => session.Run(container));
Assert.Equal("[ErrorCode:InvalidArgument] Invalid Feed Input Names: extra. Valid input names are: data_0 ", ex.Message);
Assert.StartsWith("[ErrorCode:InvalidArgument] Invalid Feed Input Names: extra. Valid input names are: ", ex.Message);
session.Dispose();
}

Expand Down

0 comments on commit 97dc949

Please sign in to comment.