Skip to content

Commit

Permalink
Core.Tests: added 2 more tests
Browse files Browse the repository at this point in the history
Added unit tests where `__` and `this` is used (instead of self).
  • Loading branch information
webwarrior-ws committed Dec 6, 2023
1 parent a283f2b commit 485ff0e
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ type Foo(content: int) =

Assert.IsTrue(this.ErrorsExist)

[<Test>]
member this.``Should suggest usage of auto-property for property that only returns immutable value (this self-identifier)`` () =
this.Parse """
type Foo(content: int) =
member this.Content = content
"""

Assert.IsTrue(this.ErrorsExist)

[<Test>]
member this.``Should suggest usage of auto-property for property that only returns immutable value (__ self-identifier)`` () =
this.Parse """
type Foo(content: int) =
member __.Content = content
"""

Assert.IsTrue(this.ErrorsExist)

[<Test>]
member this.``Should suggest usage of auto-property for property that only returns literal`` () =
this.Parse """
Expand Down

0 comments on commit 485ff0e

Please sign in to comment.