草庐IT

completed_tests

全部标签

ios - 代码 5 : Is there any way to group/filter/sort what shows up in code-completion?

对于这样一个非常简单的对象:@interfaceMyObject:NSObject@property(strong)NSObject*thingAboutMyObject;-(void)aThingToDo;-(void)moreToDo;-(void)yetAnotherAction;@end使用MyObject的人获得代码完成,其中包括NSObject的所有方法和属性。为什么会发生这种情况是有道理的,但对于大多数情况,我最关心的方法在类本身中。我想知道在创建类时是否有办法向xcodeIDE提示您在处理类的对象时要“突出显示”实际界面。我见过一些类似乎通过在方法定义中复制类名来“处理

ios - 代码 5 : Is there any way to group/filter/sort what shows up in code-completion?

对于这样一个非常简单的对象:@interfaceMyObject:NSObject@property(strong)NSObject*thingAboutMyObject;-(void)aThingToDo;-(void)moreToDo;-(void)yetAnotherAction;@end使用MyObject的人获得代码完成,其中包括NSObject的所有方法和属性。为什么会发生这种情况是有道理的,但对于大多数情况,我最关心的方法在类本身中。我想知道在创建类时是否有办法向xcodeIDE提示您在处理类的对象时要“突出显示”实际界面。我见过一些类似乎通过在方法定义中复制类名来“处理

ios - didFailWithError : Error Domain=kCLErrorDomain Code=0 "The operation couldn’ t be completed.(kCLErrorDomain 错误 0。)”

我想获取当前位置,但出现错误。这是我的ViewController的一个片段。-(void)viewDidLoad{self.locationManager=[[CLLocationManageralloc]init];[locationManagersetDelegate:self];[locationManagersetDesiredAccuracy:kCLLocationAccuracyNearestTenMeters];[locationManagerstartUpdatingLocation];}-(void)locationManager:(CLLocationManage

ios - didFailWithError : Error Domain=kCLErrorDomain Code=0 "The operation couldn’ t be completed.(kCLErrorDomain 错误 0。)”

我想获取当前位置,但出现错误。这是我的ViewController的一个片段。-(void)viewDidLoad{self.locationManager=[[CLLocationManageralloc]init];[locationManagersetDelegate:self];[locationManagersetDesiredAccuracy:kCLLocationAccuracyNearestTenMeters];[locationManagerstartUpdatingLocation];}-(void)locationManager:(CLLocationManage

Test ignored.

问题描述/***不创建对象的读*/@TestpublicvoidnoModelRead(){StringfileName=TestFileUtil.getPath()+"demo"+File.separator+"demo.xlsx";//这里只要,然后读取第一个sheet同步读取会自动finishEasyExcel.read(fileName,newNoModelDataListener()).sheet().doRead();log.info("不创建对象的读");}}@Test启动报了下面的错Testignored.问题解决:因为使用@Test的类上加了 @Ignore,加上@Ignor

testing - 如何测试容器的宽度/高度大小

我正在尝试测试容器的宽度和高度。我正在尝试做这样的事情:expect(find.byWidgetPredicate((Widgetwidget)=>widgetisContainer&&widget.width==48),findsOneWidget);但是。不幸的是,如果我输入widget.width,它会说没有为类Container定义getter宽度。 最佳答案 Container中没有这样的属性。相反,它包含一个BoxConstraints,其中包含Container的最小和最大宽度。假设minWidth和maxWidth在

testing - 如何测试容器的宽度/高度大小

我正在尝试测试容器的宽度和高度。我正在尝试做这样的事情:expect(find.byWidgetPredicate((Widgetwidget)=>widgetisContainer&&widget.width==48),findsOneWidget);但是。不幸的是,如果我输入widget.width,它会说没有为类Container定义getter宽度。 最佳答案 Container中没有这样的属性。相反,它包含一个BoxConstraints,其中包含Container的最小和最大宽度。假设minWidth和maxWidth在

testing - 测试应该找到一个特定的图标

我如何测试它是否应该找到像Icons.visibility这样的特定图标?这是我的测试:testWidgets('Shouldfindvisibility_officon',(WidgetTestertester)async{await_buildApp(tester);awaittester.pumpAndSettle();expect(find.byWidget(Icon(Icons.visibility)),findsOneWidget);}); 最佳答案 在Finder对象上有一个byIcon方法。https://api.f

testing - 测试应该找到一个特定的图标

我如何测试它是否应该找到像Icons.visibility这样的特定图标?这是我的测试:testWidgets('Shouldfindvisibility_officon',(WidgetTestertester)async{await_buildApp(tester);awaittester.pumpAndSettle();expect(find.byWidget(Icon(Icons.visibility)),findsOneWidget);}); 最佳答案 在Finder对象上有一个byIcon方法。https://api.f

testing - Flutter widget测试中如何使用List的find.byType匹配

我想对Stack进行小部件测试。这是示例代码finalListchildren=[];finalstack=Stack(children:children);awaittester.pumpWidget(Container(child:stack));...finalstackFinder=find.byWidget(stack);expect(stackFinder,findsOneWidget);//childrenshouldbeinStackfinalchildrenFinder=find.descendant(of:stackFinder,matching:find.byTy