Skip to content

Commit c76af8c

Browse files
committed
Tests(NestedFunctionNames): test for function with no params
Added a test for nested function with no parameters where the rule gives a positive.
1 parent eb741d3 commit c76af8c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/FSharpLint.Core.Tests/Rules/Conventions/Naming/NestedFunctionNames.fs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,20 @@ module Program =
5454

5555
Assert.IsTrue(this.ErrorExistsAt(4, 12))
5656

57+
[<Test>]
58+
member this.NestedFunctionNameWithNoParametersIsPascalCase() =
59+
this.Parse """
60+
module Program =
61+
let CylinderVolume () =
62+
let NestedFunction () =
63+
1
64+
65+
let pi = 3.14159
66+
pi * 2
67+
"""
68+
69+
Assert.IsTrue(this.ErrorExistsAt(4, 12))
70+
5771
[<Test>]
5872
member this.NestedFunctionNameInTypeIsPascalCase() =
5973
this.Parse """

0 commit comments

Comments
 (0)