File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
tests/FSharpLint.Core.Tests/Rules/Conventions Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,25 @@ let foo =
129129 Assert.IsTrue this.ErrorsExist
130130 Assert.IsTrue ( this.ErrorMsg.Contains " String.Empty" )
131131
132+ [<Test>]
133+ member this.FavourStaticEmptyFieldsShouldProduceError14 () =
134+ this.Parse """
135+ let foo =
136+ {
137+ Bar = ("a", "")
138+ }"""
139+
140+ Assert.IsTrue this.ErrorsExist
141+ Assert.IsTrue ( this.ErrorMsg.Contains " String.Empty" )
142+
143+ [<Test>]
144+ member this.FavourStaticEmptyFieldsShouldProduceError15 () =
145+ this.Parse """
146+ foo.[""] <- 0"""
147+
148+ Assert.IsTrue this.ErrorsExist
149+ Assert.IsTrue ( this.ErrorMsg.Contains " String.Empty" )
150+
132151 [<Test>]
133152 member this.FavourStaticEmptyFieldsShouldNotProduceError1 () =
134153 this.Parse " let bar = String.Empty"
You can’t perform that action at this time.
0 commit comments