Skip to content

Commit 88d814c

Browse files
committed
Tests(FailwithBadUsage): fix test name & add missing test
The failwithf func was not being tested properly with an arg.
1 parent 0853766 commit 88d814c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/FSharpLint.Core.Tests/Rules/Conventions/FailwithBadUsage.fs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,16 @@ with
124124
Assert.IsTrue(this.ErrorExistsOnLine 6)
125125

126126
[<Test>]
127-
member this.FailwithWithfGoodArguments2() =
127+
member this.FailwithfWithGoodArguments() =
128+
this.Parse """
129+
let foo () =
130+
failwithf "foo %i" 42
131+
"""
132+
133+
this.AssertNoWarnings()
134+
135+
[<Test>]
136+
member this.FailwithfWithGoodArguments2() =
128137
this.Parse """
129138
let foo () =
130139
failwithf "foo"

0 commit comments

Comments
 (0)