toolkit/devtools/sourcemap/tests/unit/test_base64_vlq.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /*
     2  * WARNING!
     3  *
     4  * Do not edit this file directly, it is built from the sources at
     5  * https://github.com/mozilla/source-map/
     6  */
     8 Components.utils.import('resource://test/Utils.jsm');
     9 /* -*- Mode: js; js-indent-level: 2; -*- */
    10 /*
    11  * Copyright 2011 Mozilla Foundation and contributors
    12  * Licensed under the New BSD license. See LICENSE or:
    13  * http://opensource.org/licenses/BSD-3-Clause
    14  */
    15 define("test/source-map/test-base64-vlq", ["require", "exports", "module"], function (require, exports, module) {
    17   var base64VLQ = require('source-map/base64-vlq');
    19   exports['test normal encoding and decoding'] = function (assert, util) {
    20     var result;
    21     for (var i = -255; i < 256; i++) {
    22       result = base64VLQ.decode(base64VLQ.encode(i));
    23       assert.ok(result);
    24       assert.equal(result.value, i);
    25       assert.equal(result.rest, "");
    26     }
    27   };
    29 });
    30 function run_test() {
    31   runSourceMapTests('test/source-map/test-base64-vlq', do_throw);
    32 }

mercurial