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

Commit5505b71

Browse files
committed
fix tests for invalidation handlers
1 parent0871018 commit5505b71

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎vsintegration/src/unittests/Tests.LanguageService.Script.fs‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,25 +1676,23 @@ type ScriptTests() as this =
16761676
Assert.IsTrue(countDisposals()< i,"Check1, countDisposals() < i, iteration"+ string i)
16771677
Assert.IsTrue(countCreations()>= countDisposals(),"Check2, countCreations() >= countDisposals(), iteration"+ string i)
16781678
Assert.IsTrue(countCreations()= i,"Check3, countCreations() = i, iteration"+ string i)
1679-
Assert.IsTrue(countInvaldiationHandlersAdded()= i,"Check3b, countInvaldiationHandlersAdded() = i, iteration"+ string i)
16801679
ifnot clearingthen
16811680
// By default we hold 3 build incrementalBuilderCache entries and 5 typeCheckInfo entries, so if we're not clearing
16821681
// there should be some roots to project builds still present
16831682
if i>=3then
16841683
Assert.IsTrue(i>= countDisposals()+3,"Check4a, i >= countDisposals() + 3, iteration"+ string i+", i ="+ string i+", countDisposals() ="+ string(countDisposals()))
1685-
Assert.IsTrue(i>= countInvaldiationHandlersRemoved()+3,"Check4a2, i>=countInvaldiationHandlersRemoved()+ 3, iteration"+ string i+", i ="+ string i+", countDisposals() ="+ string(countDisposals()))
1684+
printfn"Check4a2, i=%d,countInvaldiationHandlersRemoved()=%d" i(countInvaldiationHandlersRemoved())
16861685

16871686
// If we forcefully clear out caches and force a collection, then we can say much stronger things...
16881687
if clearingthen
16891688
ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients(this.VS)
16901689
Assert.IsTrue((i= countDisposals()),"Check4b, countCreations() = countDisposals(), iteration"+ string i)
1691-
Assert.IsTrue((i= countInvaldiationHandlersRemoved()),"Check4b2,countCreations() = countInvaldiationHandlersRemoved(), iteration"+ string i)
1690+
Assert.IsTrue(countInvaldiationHandlersAdded()- countInvaldiationHandlersRemoved()=0,"Check4b2,all invlidation handlers removed, iteration"+ string i)
16921691

16931692
Assert.IsTrue(countCreations()=50,"Check5, at end, countCreations() = 50")
1694-
Assert.IsTrue(countInvaldiationHandlersAdded()=50,"Check5, at end, countCreations() = 50")
16951693
ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients(this.VS)
16961694
Assert.IsTrue(countDisposals()=50,"Check6b, at end, countDisposals() = 50 after explicit clearing")
1697-
Assert.IsTrue(countInvaldiationHandlersRemoved()=50,"Check5, at end,countInvaldiationHandlersRemoved() = 50 after explicit cleraring")
1695+
Assert.IsTrue(countInvaldiationHandlersAdded()-countInvaldiationHandlersRemoved()=0,"Check6b2, at end,all invalidation handlers removed after explicit cleraring")
16981696

16991697
[<Test>]
17001698
[<Category("TypeProvider")>]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp