Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80559 views
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
*/
7
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) {
16
17
var base64VLQ = require('source-map/base64-vlq');
18
19
exports['test normal encoding and decoding'] = function (assert, util) {
20
var result = {};
21
for (var i = -255; i < 256; i++) {
22
var str = base64VLQ.encode(i);
23
base64VLQ.decode(str, 0, result);
24
assert.equal(result.value, i);
25
assert.equal(result.rest, str.length);
26
}
27
};
28
29
});
30
function run_test() {
31
runSourceMapTests('test/source-map/test-base64-vlq', do_throw);
32
}
33
34