You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

StatusTest.cs 804 B

12345678910111213141516171819202122232425262728293031323334
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using System;
  3. using Tensorflow;
  4. namespace TensorFlowNET.UnitTest
  5. {
  6. [TestClass]
  7. public class StatusTest
  8. {
  9. [TestMethod]
  10. public void NewStatus()
  11. {
  12. var s = new Status();
  13. Assert.AreEqual(s.Code, TF_Code.TF_OK);
  14. Assert.AreEqual(s.Message, String.Empty);
  15. }
  16. [TestMethod]
  17. public void SetStatus()
  18. {
  19. var s = new Status();
  20. s.SetStatus(TF_Code.TF_CANCELLED, "cancel");
  21. Assert.AreEqual(s.Code, TF_Code.TF_CANCELLED);
  22. Assert.AreEqual(s.Message, "cancel");
  23. }
  24. [TestMethod]
  25. public void DeleteStatus()
  26. {
  27. var s = new Status();
  28. s.Dispose();
  29. }
  30. }
  31. }