FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ClearScript/ClearScriptTest/ClearScriptTest.cs at master · michaelcoxon/ClearScript · GitHub
michaelcoxon
/
ClearScript
Public
forked from
ClearFoundry/ClearScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ClearScript
/
ClearScriptTest
/
ClearScriptTest.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (31 loc) · 1.07 KB
Breadcrumbs
ClearScript
/
ClearScriptTest
/
ClearScriptTest.cs
Copy path
File metadata and controls
38 lines (31 loc) · 1.07 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using
System
;
using
System
.
Threading
;
using
Microsoft
.
ClearScript
.
V8
;
using
Microsoft
.
VisualStudio
.
TestTools
.
UnitTesting
;
namespace
Microsoft
.
ClearScript
.
Test
{
public
class
ClearScriptTest
{
public
TestContext
TestContext
{
get
;
set
;
}
public
void
BaseTestCleanup
(
)
{
GC
.
Collect
(
)
;
GC
.
WaitForPendingFinalizers
(
)
;
var
proxy
=
V8TestProxy
.
Create
(
)
;
var
counters
=
proxy
.
GetCounters
(
)
;
for
(
var
attempts
=
0
;
attempts
<
10
;
attempts
++
)
{
if
(
(
counters
.
ContextCount
==
0UL
)
&&
(
counters
.
IsolateCount
==
0UL
)
)
{
return
;
}
Thread
.
Sleep
(
100
)
;
counters
=
proxy
.
GetCounters
(
)
;
}
Assert
.
AreEqual
(
0UL
,
counters
.
ContextCount
,
"Not all V8 contexts were destroyed."
)
;
Assert
.
AreEqual
(
0UL
,
counters
.
IsolateCount
,
"Not all V8 isolates were destroyed."
)
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL