[Test]
[Category("P1")]
- [Description("Compare the TensorsInfo object with different name and check the result")]
- [Property("SPEC", "Tizen.MachineLearning.Inference.TensorsInfo.Equals M")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
- [Property("COVPARAM", "TensorsInfo")]
- [Property("AUTHOR", "Sangjung Woo, sangjung.woo@samsung.com")]
- public void Equals_CHECK_Different_Name()
- {
- var in_dim = new int[4] { 10, 1, 1, 1 };
- Assert.IsInstanceOf<int[]>(in_dim, "Should return int[] instance");
- Assert.IsNotNull(in_dim, "Failed to create in_dim instance");
-
- try
- {
- var tensorsInfo = new TensorsInfo();
- Assert.IsInstanceOf<TensorsInfo>(tensorsInfo, "Should return TensorsInfo instance");
- Assert.IsNotNull(tensorsInfo, "Failed to create tensorsInfo instance");
- tensorsInfo.AddTensorInfo("test1", TensorType.UInt8, in_dim);
-
- var tensorsInfo2 = new TensorsInfo();
- Assert.IsInstanceOf<TensorsInfo>(tensorsInfo2, "Should return TensorsInfo instance");
- Assert.IsNotNull(tensorsInfo2, "Failed to create tensorsInfo instance");
- tensorsInfo2.AddTensorInfo("test2", TensorType.UInt8, in_dim);
-
- /* TEST CODE */
- Assert.IsFalse(tensorsInfo.Equals(tensorsInfo2), "Two TensorsInfo should be different");
- }
- catch (Exception e)
- {
- if (e is NotSupportedException)
- {
- LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "NotSupportedException occurs");
- Assert.IsTrue(_isMachineLeanringInferenceSupported == false, "Invalid NotSupportedException");
- }
- else
- {
- Assert.True(false, e.Message);
- }
- }
- }
-
- [Test]
- [Category("P1")]
[Description("Compare the TensorsInfo object with different type and check the result")]
[Property("SPEC", "Tizen.MachineLearning.Inference.TensorsInfo.Equals M")]
[Property("SPEC_URL", "-")]