Skip to content

Commit

Permalink
tests(TypePrefixing): failing test for [] in Always mode
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Dec 30, 2023
1 parent a9b8171 commit 1e486df
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/FSharpLint.Core.Tests/Rules/Formatting/TypePrefixing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,17 @@ type T = int array
Assert.IsTrue this.ErrorsExist
Assert.IsTrue (this.ErrorWithMessageExistsAt("Use prefix syntax for generic type.", 4, 9))

[<Test>]
member this.``Error for F# array type special postfix syntax``() =
this.Parse """
module Program
type T = int []
"""

Assert.IsTrue this.ErrorsExist
Assert.IsTrue (this.ErrorWithMessageExistsAt("Use prefix syntax for generic type (array<'Foo>).", 4, 9))

[<TestFixture>]
type TestFormattingNeverTypePrefixing() =
inherit TestAstNodeRuleBase.TestAstNodeRuleBase(TypePrefixing.rule { Config.Mode = Mode.Never })
Expand Down

0 comments on commit 1e486df

Please sign in to comment.