File tree Expand file tree Collapse file tree
PSCompatibilityCollector/Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ function Get-TypeNameAstFromScript
1313 return $typeExpAst.TypeName
1414}
1515
16+ function Get-TypeAccelerators
17+ {
18+ [psobject ].Assembly.GetType(' System.Management.Automation.TypeAccelerators' , ' nonpublic' )::Get.GetEnumerator()
19+ }
20+
1621Describe " Type name serialization" {
1722 BeforeAll {
1823 $typeNameTestCases = @ (
@@ -62,8 +67,8 @@ Describe "Type name serialization" {
6267
6368Describe " Type accelerator expansion" {
6469 BeforeAll {
65- $typeAccelerators = ( Get-TypeAccelerators ).GetEnumerator() `
66- | ForEach-Object { $d = New-Object ' System.Collections.Generic.Dictionary[string,string]' } { $d.Add ($_.Key , $_.Value.FullName ) } { $d }
70+ $typeAccelerators = Get-TypeAccelerators |
71+ ForEach-Object { $d = New-Object ' System.Collections.Generic.Dictionary[string,string]' } { $d.Add ($_.Key , $_.Value.FullName ) } { $d }
6772
6873 $typeAcceleratorTestCases = @ (
6974 @ { Raw = " [System.Exception]" ; Expanded = " System.Exception" }
You can’t perform that action at this time.
0 commit comments