@@ -921,7 +921,9 @@ void main() {
921921 expect (world.offset, 3 );
922922 });
923923
924- test ('offset/count parameters are ignored for Classes' , () async {
924+ test (
925+ 'offset/count parameters greater than zero are ignored for Classes' ,
926+ () async {
925927 final testClass = await service.getObject (
926928 isolate.id! ,
927929 rootLibrary! .classes! .first.id! ,
@@ -968,6 +970,54 @@ void main() {
968970 ]));
969971 });
970972
973+ test ('offset/count parameters equal to zero are ignored for Classes' ,
974+ () async {
975+ final testClass = await service.getObject (
976+ isolate.id! ,
977+ rootLibrary! .classes! .first.id! ,
978+ offset: 0 ,
979+ count: 0 ,
980+ ) as Class ;
981+ expect (
982+ testClass.functions,
983+ unorderedEquals ([
984+ predicate (
985+ (FuncRef f) => f.name == 'staticHello' && f.isStatic! ),
986+ predicate ((FuncRef f) => f.name == 'message' && ! f.isStatic! ),
987+ predicate ((FuncRef f) => f.name == 'notFinal' && ! f.isStatic! ),
988+ predicate ((FuncRef f) => f.name == 'hello' && ! f.isStatic! ),
989+ predicate ((FuncRef f) => f.name == '_equals' && ! f.isStatic! ),
990+ predicate ((FuncRef f) => f.name == 'hashCode' && ! f.isStatic! ),
991+ predicate ((FuncRef f) => f.name == 'toString' && ! f.isStatic! ),
992+ predicate (
993+ (FuncRef f) => f.name == 'noSuchMethod' && ! f.isStatic! ),
994+ predicate (
995+ (FuncRef f) => f.name == 'runtimeType' && ! f.isStatic! ),
996+ ]));
997+ expect (
998+ testClass.fields,
999+ unorderedEquals ([
1000+ predicate ((FieldRef f) =>
1001+ f.name == 'message' &&
1002+ f.declaredType != null &&
1003+ ! f.isStatic! &&
1004+ ! f.isConst! &&
1005+ f.isFinal! ),
1006+ predicate ((FieldRef f) =>
1007+ f.name == 'notFinal' &&
1008+ f.declaredType != null &&
1009+ ! f.isStatic! &&
1010+ ! f.isConst! &&
1011+ ! f.isFinal! ),
1012+ predicate ((FieldRef f) =>
1013+ f.name == 'staticMessage' &&
1014+ f.declaredType != null &&
1015+ f.isStatic! &&
1016+ ! f.isConst! &&
1017+ ! f.isFinal! ),
1018+ ]));
1019+ });
1020+
9711021 test ('offset/count parameters are ignored for bools' , () async {
9721022 final ref = await service.evaluate (
9731023 isolate.id! , bootstrap! .id! , 'helloBool(true)' ) as InstanceRef ;
0 commit comments