Skip to content

Commit

Permalink
tests(TypePrefixing): 1st Never Mode tests (should pass already)
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Dec 30, 2023
1 parent 0264faf commit c6c0488
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/FSharpLint.Core.Tests/Rules/Formatting/TypePrefixing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,27 @@ type TestFormattingAlwaysTypePrefixing() =
"""

Assert.IsTrue this.ErrorsExist

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

[<Test>]
member this.``Error for F# Option type prefix syntax (like hybrid)``() =
this.Parse """
module Program
type T = Option<int>
"""

Assert.IsTrue this.ErrorsExist

[<Test>]
member this.``No error for F# Option type postfix syntax (like hybrid)``() =
this.Parse """
module Program
type T = int option
"""

Assert.IsTrue this.NoErrorsExist

0 comments on commit c6c0488

Please sign in to comment.