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 857 B

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