{"size": 2361, "ext": "js", "max_stars_repo_path": "tests/ecmascript/test-bi-typedarray-misc-zeroing.js", "max_stars_repo_name": "wenq1/duktape", "max_stars_repo_stars_event_min_datetime": "2015-01-01T17:33:40.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T17:53:31.000Z", "max_issues_repo_path": "tests/ecmascript/test-bi-typedarray-misc-zeroing.js", "max_issues_repo_name": "KiraanRK/esp32-duktape", "max_issues_repo_issues_event_min_datetime": "2015-01-01T22:43:03.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-23T22:27:19.000Z", "max_forks_repo_path": "tests/ecmascript/test-bi-typedarray-misc-zeroing.js", "max_forks_repo_name": "KiraanRK/esp32-duktape", "max_forks_repo_forks_event_min_datetime": "2015-01-08T14:15:28.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T16:29:31.000Z"}
{"max_stars_count": 4268, "max_issues_count": 1667, "max_forks_count": 565, "avg_line_length": 54.9069767442, "max_line_length": 534, "alphanum_fraction": 0.7598475222}
/*
 *  Manual test for zeroing behavior with DUK_USE_ZERO_BUFFER_DATA unset.
 *
 *  Even with zeroing disabled, ArrayBuffer and typedarray constructors must
 *  zero result buffers.  Node.js buffers don't need to be zeroed (and Node.js
 *  won't do that).
 *
 *  The expect string is for DUK_USE_ZERO_BUFFER_DATA set, i.e. all data is
 *  zeroed (which is the default).  This is correct for ArrayBuffer and
 *  typedarray views, but not for Node.js.
 */

/*---
{
    "custom": true
}
---*/

/*===
|00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
|00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|
{type:"Buffer",data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
===*/

function test() {
    var buf;

    buf = new ArrayBuffer(256);
    print(Duktape.enc('jx', buf));

    buf = new Uint16Array(128);
    print(Duktape.enc('jx', buf));

    buf = new Buffer(256);
    print(Duktape.enc('jx', buf));
}

try {
    test();
} catch (e) {
    print(e.stack || e);
}
