Skip to content

Commit eb36fdf

Browse files
committed
Merge pull request #574 from ncave/netcore
Minor test fix for netcore xplat
2 parents ae5f77c + 8b2055b commit eb36fdf

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

tests/service/ProjectAnalysisTests.fs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4096,8 +4096,9 @@ let ``Test project31 C# type attributes`` () =
40964096

40974097
let objSymbol = wholeProjectResults.GetAllUsesOfAllSymbols() |> Async.RunSynchronously |> Array.find (fun su -> su.Symbol.DisplayName = "List")
40984098
let objEntity = objSymbol.Symbol :?> FSharpEntity
4099-
4100-
[ for attrib in objEntity.Attributes do
4099+
let attributes = objEntity.Attributes |> Seq.filter (fun attrib -> attrib.AttributeType.DisplayName <> "__DynamicallyInvokableAttribute")
4100+
4101+
[ for attrib in attributes do
41014102
let args = try Seq.toList attrib.ConstructorArguments with _ -> []
41024103
let namedArgs = try Seq.toList attrib.NamedArguments with _ -> []
41034104
let output = sprintf "%A" (attrib.AttributeType, args, namedArgs)
@@ -4108,9 +4109,6 @@ let ``Test project31 C# type attributes`` () =
41084109
"(DebuggerTypeProxyAttribute, [], [])";
41094110
"""(DebuggerDisplayAttribute, [(type Microsoft.FSharp.Core.string, "Count = {Count}")], [])""";
41104111
"""(DefaultMemberAttribute, [(type Microsoft.FSharp.Core.string, "Item")], [])""";
4111-
#if DOTNETCORE
4112-
"(__DynamicallyInvokableAttribute, [], [])";
4113-
#endif
41144112
])
41154113

41164114
[<Test>]
@@ -4144,16 +4142,14 @@ let ``Test project31 Format C# type attributes`` () =
41444142

41454143
let objSymbol = wholeProjectResults.GetAllUsesOfAllSymbols() |> Async.RunSynchronously |> Array.find (fun su -> su.Symbol.DisplayName = "List")
41464144
let objEntity = objSymbol.Symbol :?> FSharpEntity
4147-
4148-
[ for attrib in objEntity.Attributes -> attrib.Format(objSymbol.DisplayContext) ]
4145+
let attributes = objEntity.Attributes |> Seq.filter (fun attrib -> attrib.AttributeType.DisplayName <> "__DynamicallyInvokableAttribute")
4146+
4147+
[ for attrib in attributes -> attrib.Format(objSymbol.DisplayContext) ]
41494148
|> set
41504149
|> shouldEqual
41514150
(set ["[<DebuggerTypeProxyAttribute (typeof<Mscorlib_CollectionDebugView<>>)>]";
41524151
"""[<DebuggerDisplayAttribute ("Count = {Count}")>]""";
41534152
"""[<Reflection.DefaultMemberAttribute ("Item")>]""";
4154-
#if DOTNETCORE
4155-
"[<__DynamicallyInvokableAttribute ()>]";
4156-
#endif
41574153
])
41584154

41594155
[<Test>]

0 commit comments

Comments
 (0)