public void CheckSimpleDataTypeWithArray() { using (var tensor = new TFTensor(123)) { var exception = Assert.Throws <InvalidOperationException> (() => tensor.CheckSimpleDataType(typeof(Array))); Assert.Equal("An array is not a simple type, use CheckDataTypeAndSize(Type type, long length)", exception.Message); } }
public void CheckSimpleDataTypeOnArrayTensor() { using (var tensor = new TFTensor(new [] { 123 })) { var exception = Assert.Throws <ArgumentException> (() => tensor.CheckSimpleDataType(typeof(int))); Assert.Equal("This tensor is an array tensor, not a simple tensor", exception.Message); } }
public void CheckSimpleDataType(Type type, String expected) { using (var tensor = new TFTensor(123)) AssertCheck(() => tensor.CheckSimpleDataType(type), expected); }