Skip to content

Commit

Permalink
Adding regression test for #631. (#1017)
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf authored Aug 19, 2020
1 parent 17fa4cb commit e7a9b75
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/Fantomas.Tests/AttributeTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -574,3 +574,34 @@ type RoleAdminImportController(akkaService: AkkaService) =
return Ok job
}
"""

[<Test>]
let ``compiler defines around SynAttribute nodes, 631`` () =
formatSourceString false """
type internal Handler() =
class
[<
#if NETCOREAPP2_1
Builder.Object;
#else
Widget;
#endif
DefaultValue(true)>]
val mutable mainWindow: Window
end
""" config
|> prepend newline
|> should equal """
type internal Handler() =
class
[<
#if NETCOREAPP2_1
Builder.Object;
#else
Widget;
#endif
DefaultValue(true)>]
val mutable mainWindow: Window
end
"""

0 comments on commit e7a9b75

Please sign in to comment.