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