FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ClearScript/ClearScriptTest/BugFixTest.NetFramework.cs at master · RWooters/ClearScript · GitHub
RWooters
/
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
/
BugFixTest.NetFramework.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
119 lines (104 loc) · 3.95 KB
Breadcrumbs
ClearScript
/
ClearScriptTest
/
BugFixTest.NetFramework.cs
Copy path
File metadata and controls
119 lines (104 loc) · 3.95 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using
System
.
Reflection
;
using
Microsoft
.
ClearScript
.
Util
;
using
Microsoft
.
ClearScript
.
Windows
;
using
Microsoft
.
VisualStudio
.
TestTools
.
UnitTesting
;
namespace
Microsoft
.
ClearScript
.
Test
{
public
partial
class
BugFixTest
{
#region test methods
[
TestMethod
,
TestCategory
(
"BugFix"
)
]
public
void
BugFix_AssemblyTableClass
(
)
{
Assert
.
IsTrue
(
typeof
(
AssemblyTable
.
AssemblyTableImpl
)
.
IsStatic
(
)
)
;
Assert
.
IsNotNull
(
typeof
(
AssemblyTable
.
AssemblyTableImpl
)
.
TypeInitializer
)
;
var
members
=
typeof
(
AssemblyTable
.
AssemblyTableImpl
)
.
GetMembers
(
BindingFlags
.
Static
|
BindingFlags
.
Public
)
;
Assert
.
AreEqual
(
1
,
members
.
Length
)
;
Assert
.
AreEqual
(
MemberTypes
.
Method
,
members
[
0
]
.
MemberType
)
;
Assert
.
AreEqual
(
"GetFullAssemblyNameImpl"
,
members
[
0
]
.
Name
)
;
}
[
TestMethod
,
TestCategory
(
"BugFix"
)
]
public
void
BugFix_V8StackLimitIntegerOverflow
(
)
{
TestUtil
.
InvokeConsoleTest
(
"BugFix_V8StackLimitIntegerOverflow"
)
;
}
[
TestMethod
,
TestCategory
(
"BugFix"
)
]
public
void
BugFix_MultipleAppDomains
(
)
{
TestUtil
.
InvokeConsoleTest
(
"BugFix_MultipleAppDomains"
)
;
}
[
TestMethod
,
TestCategory
(
"BugFix"
)
]
public
void
BugFix_XMLDOM_Enumeration_Attributes_JScript
(
)
{
var
document
=
new
MSXML2
.
DOMDocument60Class
(
)
;
document
.
loadXML
(
@"
<document>
<page id=""123""/>
<separator/>
<page id=""456""/>
<page id=""789""/>
<page id=""987""/>
<separator/>
<page id=""654""/>
<page id=""321""/>
<page id=""135""/>
<separator/>
<page id=""246""/>
<page id=""357""/>
<page id=""468""/>
<separator/>
<page id=""579""/>
</document>
"
)
;
engine
.
Dispose
(
)
;
engine
=
new
JScriptEngine
(
)
;
engine
.
AddHostObject
(
"document"
,
document
)
;
engine
.
Execute
(
@"
allPages = document.getElementsByTagName('page');
total = 0;
for (var e = new Enumerator(allPages); !e.atEnd(); e.moveNext()) {
total = total + parseInt(e.item().getAttribute('id'))
}
"
)
;
Assert
.
AreEqual
(
5115
,
engine
.
Script
.
total
)
;
}
[
TestMethod
,
TestCategory
(
"BugFix"
)
]
public
void
BugFix_XMLDOM_Enumeration_Attributes_VBScript
(
)
{
var
document
=
new
MSXML2
.
DOMDocument60Class
(
)
;
document
.
loadXML
(
@"
<document>
<page id=""123""/>
<separator/>
<page id=""456""/>
<page id=""789""/>
<page id=""987""/>
<separator/>
<page id=""654""/>
<page id=""321""/>
<page id=""135""/>
<separator/>
<page id=""246""/>
<page id=""357""/>
<page id=""468""/>
<separator/>
<page id=""579""/>
</document>
"
)
;
engine
.
Dispose
(
)
;
engine
=
new
VBScriptEngine
(
)
;
engine
.
AddHostObject
(
"document"
,
document
)
;
engine
.
Execute
(
@"
set allPages = document.getElementsByTagName(""page"")
total = 0
for each page in allPages
total = total + CInt(page.getAttribute(""id""))
next
"
)
;
Assert
.
AreEqual
(
5115
,
engine
.
Script
.
total
)
;
}
#endregion
}
}
Back
|
FazBrowse Home
|
New Git URL