Exemplo n.º 1
0
def test_pad():
    file_path = os.path.join(constants.seeds_dir, 'WebKit.JSTests.es6/String.prototype_methods_String.prototype.padEnd.js')
    res = multicall.callAll(file_path)
    assert "bad error:" in str(res)

    file_path = os.path.join(constants.seeds_dir, 'WebKit.JSTests.es6/String.prototype_methods_String.prototype.padStart.js')
    res = multicall.callAll(file_path)
    assert "bad error:" in str(res)
Exemplo n.º 2
0
def test_max():
    pathName = os.path.join(constants.seeds_dir, 'max.js')
    res = multicall.callAll(pathName)
    assert 67 == int(res.jsc_outerr)
    assert 67 == int(res.chakra_outerr)
    assert 67 == int(res.spiderm_outerr)
    assert 67 == int(res.v8_outerr)
Exemplo n.º 3
0
def call_engines(fuzzed_file_path, libs):
    return multicall.callAll(fuzzed_file_path, libs=libs)
Exemplo n.º 4
0
def test_max():
    pathName = os.path.join(constants.seeds_dir, 'exercise_1/chakra_4953.js')
    res = multicall.callAll(pathName)
    print('\n', res)
Exemplo n.º 5
0
def test_date():
    path_name = os.path.join(constants.seeds_dir,
                             'exercise_1/spidermonkey_1395844.js')
    res = multicall.callAll(path_name)
    print('\n', res)
Exemplo n.º 6
0
def test_regexp_prototype():
    # https://github.com/Microsoft/ChakraCore/issues/578
    path_name = os.path.join(constants.seeds_dir, 'WebKit.JSTests.es6/Proxy_internal_get_calls_RegExp.prototype.test.js')
    res = multicall.callAll(path_name)
    #TODO: general advice: don't add print messages in tests. use assertions. - Marcelo
    print(res)
Exemplo n.º 7
0
def test_t():
    file_path = os.path.join(constants.logs_dir, 'fuzzed_Symbol_typeof_support.js')
    res = multicall.callAll(file_path)
    print('\n', res)
    # assert 'handle files without method reference' in str(res)
Exemplo n.º 8
0
def test_array_prototype_values():
    # Array.prototype.values not yet implemented on v8
    file_path = os.path.join(constants.logs_dir, 'fuzzed_Array.prototype_methods_Array.prototype.values.js')
    res = multicall.callAll(file_path)
    print('\n',res)
Exemplo n.º 9
0
def test_regexp_flags():
    # Object.getOwnPropertyDescriptor invalid 
    # https://github.com/Microsoft/ChakraCore/issues/254
    file_path = os.path.join(constants.seeds_dir, 'WebKit.JSTests.es6/Proxy_internal_get_calls_RegExp.prototype.flags.js')
    res = multicall.callAll(file_path)
    print('\n',res)
Exemplo n.º 10
0
def test_string_includes():
    # https://github.com/Microsoft/ChakraCore/issues/577
    file_path = os.path.join(constants.seeds_dir, 'WebKit.JSTests.es6/well-known_symbols_Symbol.match_String.prototype.includes.js')
    res = multicall.callAll(file_path)
    print('\n',res)
Exemplo n.º 11
0
 def call_engines(self, fuzzed_file_path, shell):
     # return multicall_v2.callAll(fuzzed_file_path, shell=shell)
     return multicall.callAll(fuzzed_file_path, shell=shell)