Sha256: c081cdeb0d13b28f6d762479de75852cb7db6cbba1972fcf7d386d2c8f615383

Contents?: true

Size: 1.07 KB

Versions: 137

Compression:

Stored size: 1.07 KB

Contents

/**
 * There was an incorrect sort behaviour documented in issue #143:
 * (x = f(…)) <= x → x >= (x = f(…))
 *
 * For example, let the equation be:
 * (a = parseInt('100')) <= a
 *
 * If a was an integer and has the value of 99,
 * (a = parseInt('100')) <= a → 100 <= 100 → true
 *
 * When transformed incorrectly:
 * a >= (a = parseInt('100')) → 99 >= 100 → false
 */

tranformation_sort_order_equal: {
    options = {
        comparisons: true,
    };

    input: { (a = parseInt('100')) == a }
    expect: { (a = parseInt('100')) == a }
}

tranformation_sort_order_unequal: {
    options = {
        comparisons: true,
    };

    input: { (a = parseInt('100')) != a }
    expect: { (a = parseInt('100')) != a }
}

tranformation_sort_order_lesser_or_equal: {
    options = {
        comparisons: true,
    };

    input: { (a = parseInt('100')) <= a }
    expect: { (a = parseInt('100')) <= a }
}
tranformation_sort_order_greater_or_equal: {
    options = {
        comparisons: true,
    };

    input: { (a = parseInt('100')) >= a }
    expect: { (a = parseInt('100')) >= a }
}

Version data entries

137 entries across 135 versions & 6 rubygems

Version Path
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.13 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.12 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.11 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.10 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.9 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.8 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.7 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.6 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.5 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js
trusty-festivity-extension-2.5.4 node_modules/bower/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js