Skip to content

Commit 8c60856

Browse files
committed
Tests(FailwithBadUsage): change most err msgs
This might likely fix the flaky tests that we started getting lately. Maybe they were exposed by some recent change that made them run in parallel [1]. [1] ca158b8 Closes #763
1 parent 88d814c commit 8c60856

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ let bar () =
3232
member this.FailwithWithBadArgumentsEmptyMessage3() =
3333
this.Parse """
3434
let foo () =
35-
failwith "foo"
35+
failwith "foo1"
3636
let bar () =
3737
failwith String.Empty
3838
"""
@@ -44,9 +44,9 @@ let bar () =
4444
member this.FailwithWithGoodArguments() =
4545
this.Parse """
4646
let foo () =
47-
failwith "foo"
47+
failwith "foo2"
4848
let bar () =
49-
failwith "bar"
49+
failwith "bar2"
5050
"""
5151

5252
this.AssertNoWarnings()
@@ -55,7 +55,7 @@ let bar () =
5555
member this.FailwithWithGoodArguments2() =
5656
this.Parse """
5757
let foo () =
58-
failwith "foo"
58+
failwith "foo3"
5959
"""
6060

6161
this.AssertNoWarnings()
@@ -79,7 +79,7 @@ try
7979
foo()
8080
with
8181
| e ->
82-
failwith "bar"
82+
failwith "bar4"
8383
"""
8484

8585
Assert.IsTrue this.ErrorsExist
@@ -92,7 +92,7 @@ try
9292
foo()
9393
with
9494
| e ->
95-
raise new Exception("bar",e)
95+
raise new Exception("bar5", e)
9696
"""
9797

9898
Assert.IsTrue this.NoErrorsExist
@@ -104,7 +104,7 @@ try
104104
foo()
105105
with
106106
| e ->
107-
failwithf "bar"
107+
failwithf "bar6"
108108
"""
109109

110110
Assert.IsTrue this.ErrorsExist
@@ -117,7 +117,7 @@ try
117117
foo()
118118
with
119119
| e ->
120-
failwithf "bar %i" 42
120+
failwithf "bar7 %i" 42
121121
"""
122122

123123
Assert.IsTrue this.ErrorsExist
@@ -127,7 +127,7 @@ with
127127
member this.FailwithfWithGoodArguments() =
128128
this.Parse """
129129
let foo () =
130-
failwithf "foo %i" 42
130+
failwithf "foo8 %i" 42
131131
"""
132132

133133
this.AssertNoWarnings()
@@ -136,7 +136,7 @@ let foo () =
136136
member this.FailwithfWithGoodArguments2() =
137137
this.Parse """
138138
let foo () =
139-
failwithf "foo"
139+
failwithf "foo9"
140140
"""
141141

142142
this.AssertNoWarnings()

0 commit comments

Comments
 (0)