代码:
int[]
此处此方法的返回类型Iterable int[]=new Iterable int[];
ApDatacollection apData=Mockito.mock(ApDatacollection.class);
是Iterable Mockito.when(apData.createvaluetraversalbasis(nbvautoxpathconstants.DRIVER)).thenReturn(IdArray);
。我试着嘲笑如下。
Junits:
img_data = new unsigned short[80*80];
/* some code that set the unsigned short array elements */
cv::Mat img(80, 80, CV_16UC1, cv::Scalar(0));
img.data = ??? ; // conversion from unsigned short * to uchar * ????
(?m)^.*(?:(?:201[89]|2\d[2-9]\d|[3-9]\d{3})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])|2017-(?:12-(?:0[1-9]|[12]\d|3[01])|11-(?:0[6-9]|[12]\d|3[01])))$
结果:我收到编译错误。有人可以帮我解决如何模拟可迭代数组。