Skip to content

Commit

Permalink
Add test for #1463 (#1682)
Browse files Browse the repository at this point in the history
The reported assertion was resolved in JerryScript. Fixes #1463.

IoT.js-DCO-1.0-Signed-off-by: László Langó [email protected]
  • Loading branch information
LaszloLango authored and yichoi committed Jun 12, 2018
1 parent efada30 commit 3be70a8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/run_pass/issue/issue-1463.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2018-present Samsung Electronics Co., Ltd. and other contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

var assert = require('assert');

function readfile(fileName) {
return new Promise(function(resolve, reject) {
throw function() {}(), Buffer;
});
};

try {
readfile(readfile).then(function(value) {
loadfi([], 0);
}).prototype(function(e) {});
assert(false);
} catch (ex) {
assert(ex instanceof TypeError);
}
6 changes: 6 additions & 0 deletions test/testsets.json
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,12 @@
{
"name": "issue-1348.js"
},
{
"name": "issue-1463.js",
"required-features": [
"Promise"
]
},
{
"name": "issue-1485.js"
},
Expand Down

0 comments on commit 3be70a8

Please sign in to comment.