Skip to content

Commit 1a03ab0

Browse files
ShortDevelopmentrhuanjl
authored andcommitted
Fix incorrect code
1 parent 76d058f commit 1a03ab0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

test/Array/array_splice.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56

@@ -121,7 +122,7 @@ try
121122
}
122123
catch(e)
123124
{
124-
if (!e instanceof TypeError) throw(e);
125+
if (!(e instanceof TypeError)) throw(e);
125126
WScript.Echo(y);
126127
WScript.Echo(x);
127128
}
@@ -132,7 +133,7 @@ try
132133
}
133134
catch(e)
134135
{
135-
if (!e instanceof TypeError) throw(e);
136+
if (!(e instanceof TypeError)) throw(e);
136137
WScript.Echo(y);
137138
WScript.Echo(x);
138139
}
@@ -143,7 +144,7 @@ try
143144
}
144145
catch(e)
145146
{
146-
if (!e instanceof TypeError) throw(e);
147+
if (!(e instanceof TypeError)) throw(e);
147148
WScript.Echo(y);
148149
WScript.Echo(x);
149150
}

test/Array/array_splice_double.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56

@@ -121,7 +122,7 @@ try
121122
}
122123
catch(e)
123124
{
124-
if (!e instanceof TypeError) throw(e);
125+
if (!(e instanceof TypeError)) throw(e);
125126
WScript.Echo(y);
126127
WScript.Echo(x);
127128
}
@@ -132,7 +133,7 @@ try
132133
}
133134
catch(e)
134135
{
135-
if (!e instanceof TypeError) throw(e);
136+
if (!(e instanceof TypeError)) throw(e);
136137
WScript.Echo(y);
137138
WScript.Echo(x);
138139
}
@@ -143,7 +144,7 @@ try
143144
}
144145
catch(e)
145146
{
146-
if (!e instanceof TypeError) throw(e);
147+
if (!(e instanceof TypeError)) throw(e);
147148
WScript.Echo(y);
148149
WScript.Echo(x);
149150
}

test/es5/RegExpStrictDelete.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
34
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
45
//-------------------------------------------------------------------------------------------------------
56

@@ -22,7 +23,7 @@ for (var i = 0, len = props.length; i < len; i++)
2223
}
2324
catch (err)
2425
{
25-
if (!err instanceof TypeError)
26+
if (!(err instanceof TypeError))
2627
WScript.Echo("Error: strict delete threw a non-TypeError: " + err);
2728
}
2829
}

0 commit comments

Comments
 (0)