Skip to content

Test cases of QuickJS execution failed #65

@haigithub

Description

@haigithub

Problem Description:
I found that some test cases in repo QuickJS failed to execute.

Expectation:
All test cases in the directory tests/ of QuickJS would succeed to execute.

Actual test results:

command test result remark
./qjs path/to/quickjs/tests/microbench.js pass -
./qjs path/to/quickjs/tests/test_builtin.js pass -
./qjs path/to/quickjs/tests/test_std.js pass -
./qjs path/to/quickjs/tests/test_bignum.js failed Error: SyntaxError: invalid number literal
./qjs path/to/quickjs/tests/test_closure.js failed Error: SyntaxError: invalid keyword: with
./qjs path/to/quickjs/tests/test_language.js failed Error: SyntaxError: invalid keyword: with
./qjs path/to/quickjs/tests/test_loop.js failed Error: SyntaxError: a declaration in the head of a for-in loop can't have an initializer
./qjs path/to/quickjs/tests/test_worker.js failed SegmentFault
./qjs path/to/quickjs/tests/test_op_overloading.js failed Error: ReferenceError: 'Operators' is not defined
./qjs path/to/quickjs/tests/test_qjscalc.js failed Error: Error: assertion failed: got

test_bignum.js
Error: SyntaxError: invalid number literal
at /home/oem/path/to/quickjs/tests/test_bignum.js:155

test_closure.js
Error: SyntaxError: invalid keyword: with
at /home/oem/path/to/quickjs/tests/test_closure.js:157

test_language.js
Error: SyntaxError: invalid keyword: with
at /home/oem/path/to/quickjs/tests/test_language.js:379

Error: SyntaxError: a declaration in the head of a for-in loop can't have an initializer
at /home/oem/path/to/quickjs/tests/test_loop.js:144

test_op_overloading.js
Error: ReferenceError: 'Operators' is not defined
at test_operators_create (/home/oem/path/to/quickjs/tests/test_op_overloading.js:39)
at (/home/oem/path/to/quickjs/tests/test_op_overloading.js:205)

test_qjscalc.js
Error: Error: assertion failed: got |false|, expected |true|
at assert (/home/oem/path/to/quickjs/tests/test_qjscalc.js:18)
at test_integer (/home/oem/path/to/quickjs/tests/test_qjscalc.js:52)
at (/home/oem/path/to/quickjs/tests/test_qjscalc.js:245)

Development environment: Ubuntu 20.04

Problem recurrence steps:

  1. Download QuickJS
git clone https://github.com/bellard/quickjs.git
git checkout b5e62895c619d4ffc75c9d822c8d85f1ece77e5b // checkout into the same version with quickjspp

git log
commit b5e62895c619d4ffc75c9d822c8d85f1ece77e5b (HEAD)
Author: bellard <6490144+bellard@users.noreply.github.com>
Date:   Sat Mar 27 11:17:31 2021 +0100

    2021-03-27 release
  1. Download and build quickjspp
git clone https://github.com/ftk/quickjspp.git
cd quickjspp/
mkdir build
cd build/
cmake ..
make -j16
  1. run test cases
cd quickjspp/build/
./qjs path/to/quickjs/tests/xxx.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions