File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed
tests/FSharpLint.Core.Tests/Rules/Hints Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 451451 " pattern: x::[] ===> [x]" ,
452452
453453 " x @ [] ===> x" ,
454- " [x] @ y ===> x:: y" ,
454+ " (List.singleton x) @ y ===> x :: y" ,
455455
456456 " List.isEmpty [] ===> true" ,
457457 " Array.isEmpty [||] ===> true" ,
Original file line number Diff line number Diff line change @@ -957,21 +957,10 @@ let x y =
957957
958958 [<Test>]
959959 member this. ``List append of singleton item can be replaced with :: operator`` () =
960- let source = """ [ head] @ tail"""
960+ let source = """ (List.singleton head) @ tail"""
961961
962962 let expected = """ head :: tail"""
963963
964- this.SetConfig([ " [x] @ y ===> x:: y" ])
964+ this.SetConfig([ " (List.singleton x) @ y ===> x :: y" ])
965965 this.Parse( source)
966966 Assert.AreEqual( expected, this.ApplyQuickFix source)
967-
968- [<Test>]
969- member this. ``Demonstrate issue with recently added hint`` () =
970- let source = """ [a;b] @ tail"""
971-
972- this.SetConfig([ " [x] @ y ===> x::y" ])
973- this.Parse( source)
974-
975- // invalid!
976- Assert.AreNotEqual( " a;b :: tail" , this.ApplyQuickFix source)
977-
You can’t perform that action at this time.
0 commit comments