@@ -449,12 +449,13 @@ private void AssertHasOnlyExpectedProperties(string[] expected_names, IEnumerabl
449449 throw new XunitException ( $ "missing or unexpected members found") ;
450450 }
451451
452- public static TheoryData < Dictionary < string , JObject > , Dictionary < string , JObject > , Dictionary < string , JObject > , string > GetDataForProtectionLevels ( )
452+ public static TheoryData < Dictionary < string , JObject > , Dictionary < string , JObject > , string > GetDataForProtectionLevels ( )
453453 {
454- var data = new TheoryData < Dictionary < string , JObject > , Dictionary < string , JObject > , Dictionary < string , JObject > , string > ( ) ;
454+ var data = new TheoryData < Dictionary < string , JObject > , Dictionary < string , JObject > , string > ( ) ;
455455
456456 var public_props = new Dictionary < string , JObject > ( )
457457 {
458+ // --------- public ------------:
458459 // own:
459460 { "BaseBase_PropertyForHidingWithField" , TNumber ( 210 ) } ,
460461 { "Base_PropertyForOverridingWithProperty" , TGetter ( "Base_PropertyForOverridingWithProperty" , TDateTime ( new DateTime ( 2020 , 7 , 6 , 5 , 4 , 3 ) ) ) } ,
@@ -487,10 +488,8 @@ public static TheoryData<Dictionary<string, JObject>, Dictionary<string, JObject
487488 { "BaseBase_AutoPropertyForHidingWithAutoProperty (BaseBaseClass2)" , TString ( "BaseBase#BaseBase_AutoPropertyForHidingWithAutoProperty" ) } ,
488489 { "BaseBase_PropertyForVHO (BaseBaseClass2)" , TGetter ( "BaseBase_PropertyForVHO (BaseBaseClass2)" , TString ( "BaseBase#BaseBase_PropertyForVHO" ) ) } ,
489490 { "BaseBase_AutoPropertyForVHO (BaseBaseClass2)" , TString ( "BaseBase#BaseBase_AutoPropertyForVHO" ) } ,
490- } ;
491-
492- var internal_protected_props = new Dictionary < string , JObject > ( ) {
493491
492+ // ---- internal / protected ----:
494493 // own:
495494 { "BaseBase_AutoPropertyForHidingWithProperty" , TGetter ( "BaseBase_AutoPropertyForHidingWithProperty" , TString ( "Derived#BaseBase_AutoPropertyForHidingWithProperty" ) ) } ,
496495 { "Base_PropertyForOverridingWithAutoProperty" , TDateTime ( new DateTime ( 2022 , 7 , 6 , 5 , 4 , 3 ) ) } ,
@@ -510,20 +509,19 @@ public static TheoryData<Dictionary<string, JObject>, Dictionary<string, JObject
510509 { "BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)" , TGetter ( "BaseBase_AutoPropertyForHidingWithProperty (BaseClass2)" , TString ( "Base#BaseBase_AutoPropertyForHidingWithProperty" ) ) } ,
511510 { "BaseBase_PropertyForHidingWithAutoProperty" , TString ( "Base#BaseBase_PropertyForHidingWithAutoProperty" ) } ,
512511 } ;
513- data . Add ( public_props , internal_protected_props , private_props , "DerivedClass2" ) ;
512+ data . Add ( public_props , private_props , "DerivedClass2" ) ;
514513
515514 // structure CloneableStruct:
516515 public_props = new Dictionary < string , JObject > ( )
517516 {
518517 // own
518+ // public
519519 { "a" , TNumber ( 4 ) } ,
520520 { "DateTime" , TGetter ( "DateTime" ) } ,
521521 { "AutoStringProperty" , TString ( "CloneableStruct#AutoStringProperty" ) } ,
522522 { "FirstName" , TGetter ( "FirstName" ) } ,
523- { "LastName" , TGetter ( "LastName" ) }
524- } ;
525- internal_protected_props = new Dictionary < string , JObject > ( )
526- {
523+ { "LastName" , TGetter ( "LastName" ) } ,
524+
527525 // internal
528526 { "b" , TBool ( true ) }
529527 } ;
@@ -533,29 +531,27 @@ public static TheoryData<Dictionary<string, JObject>, Dictionary<string, JObject
533531 { "_dateTime" , TDateTime ( new DateTime ( 2020 , 7 , 6 , 5 , 4 , 3 + 3 ) ) } ,
534532 { "_DTProp" , TGetter ( "_DTProp" ) }
535533 } ;
536- data . Add ( public_props , internal_protected_props , private_props , "CloneableStruct" ) ;
534+ data . Add ( public_props , private_props , "CloneableStruct" ) ;
537535 return data ;
538536 }
539537
540538 [ ConditionalTheory ( nameof ( RunningOnChrome ) ) ]
541539 [ MemberData ( nameof ( GetDataForProtectionLevels ) ) ]
542540 public async Task PropertiesSortedByProtectionLevel (
543- Dictionary < string , JObject > expectedPublic , Dictionary < string , JObject > expectedProtInter , Dictionary < string , JObject > expectedPriv , string entryMethod ) =>
541+ Dictionary < string , JObject > expectedPublicInternalAndProtected , Dictionary < string , JObject > expectedPriv , string entryMethod ) =>
544542 await CheckInspectLocalsAtBreakpointSite (
545543 $ "DebuggerTests.GetPropertiesTests.{ entryMethod } ", "InstanceMethod" , 1 , $ "DebuggerTests.GetPropertiesTests.{ entryMethod } .InstanceMethod",
546544 $ "window.setTimeout(function() {{ invoke_static_method ('[debugger-test] DebuggerTests.GetPropertiesTests.{ entryMethod } :run'); }})",
547545 wait_for_event_fn : async ( pause_location ) =>
548546 {
549547 var id = pause_location [ "callFrames" ] [ 0 ] [ "callFrameId" ] . Value < string > ( ) ;
550548 var ( obj , _) = await EvaluateOnCallFrame ( id , "this" ) ;
551- var ( pub , internalAndProtected , priv ) = await GetPropertiesSortedByProtectionLevels ( obj [ "objectId" ] ? . Value < string > ( ) ) ;
549+ var ( pubInternalAndProtected , priv ) = await GetPropertiesSortedByProtectionLevels ( obj [ "objectId" ] ? . Value < string > ( ) ) ;
552550
553- AssertHasOnlyExpectedProperties ( expectedPublic . Keys . ToArray ( ) , pub . Values < JObject > ( ) ) ;
554- AssertHasOnlyExpectedProperties ( expectedProtInter . Keys . ToArray ( ) , internalAndProtected . Values < JObject > ( ) ) ;
551+ AssertHasOnlyExpectedProperties ( expectedPublicInternalAndProtected . Keys . ToArray ( ) , pubInternalAndProtected . Values < JObject > ( ) ) ;
555552 AssertHasOnlyExpectedProperties ( expectedPriv . Keys . ToArray ( ) , priv . Values < JObject > ( ) ) ;
556553
557- await CheckProps ( pub , expectedPublic , "public" ) ;
558- await CheckProps ( internalAndProtected , expectedProtInter , "internalAndProtected" ) ;
554+ await CheckProps ( pubInternalAndProtected , expectedPublicInternalAndProtected , "result" ) ;
559555 await CheckProps ( priv , expectedPriv , "private" ) ;
560556 } ) ;
561557 }
0 commit comments