Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit693e8a3

Browse files
committed
Added two tests for object initializer syntax for completion
1 parent82a137c commit693e8a3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

‎vsintegration/tests/unittests/CompletionProviderTests.fs‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,37 @@ x.
259259
"ToArray";"ToString";"TrimExcess";"TrueForAll"]
260260
VerifyCompletionListExactly(fileContents,"x.", expected)
261261

262+
[<Test>]
263+
let``Constructing a new class with object initializer syntax``()=
264+
letfileContents="""
265+
type A() =
266+
member val SettableProperty = 1 with get, set
267+
member val AnotherSettableProperty = 1 with get, set
268+
member val NonSettableProperty = 1
269+
270+
let _ = new A(Setta
271+
"""
272+
273+
letexpected=["SettableProperty";"AnotherSettableProperty"]
274+
letnotExpected=["NonSettableProperty"]
275+
VerifyCompletionList(fileContents,"(Setta", expected, notExpected)
276+
277+
[<Test>]
278+
let``Constructing a new fully qualified class with object initializer syntax``()=
279+
letfileContents="""
280+
module M =
281+
type A() =
282+
member val SettableProperty = 1 with get, set
283+
member val AnotherSettableProperty = 1 with get, set
284+
member val NonSettableProperty = 1
285+
286+
let _ = new M.A(Setta
287+
"""
288+
289+
letexpected=["SettableProperty";"AnotherSettableProperty"]
290+
letnotExpected=["NonSettableProperty"]
291+
VerifyCompletionList(fileContents,"(Setta", expected, notExpected)
292+
262293
[<Test>]
263294
let``Extension methods go after everything else,extension properties are treated as normal ones``()=
264295
letfileContents="""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp