Sha256: 7daba1a525889d2ed3efb2ed17e347d4219c4991a7b99ffb9d186645138ee2da

Contents?: true

Size: 919 Bytes

Versions: 19

Compression:

Stored size: 919 Bytes

Contents

/* -*- Mode: js; js-indent-level: 2; -*- */
/*
 * Copyright 2011 Mozilla Foundation and contributors
 * Licensed under the New BSD license. See LICENSE or:
 * http://opensource.org/licenses/BSD-3-Clause
 */
if (typeof define !== 'function') {
    var define = require('amdefine')(module);
}
define(function (require, exports, module) {

  var base64 = require('../../lib/source-map/base64');

  exports['test out of range encoding'] = function (assert, util) {
    assert.throws(function () {
      base64.encode(-1);
    });
    assert.throws(function () {
      base64.encode(64);
    });
  };

  exports['test out of range decoding'] = function (assert, util) {
    assert.throws(function () {
      base64.decode('=');
    });
  };

  exports['test normal encoding and decoding'] = function (assert, util) {
    for (var i = 0; i < 64; i++) {
      assert.equal(base64.decode(base64.encode(i)), i);
    }
  };

});

Version data entries

19 entries across 13 versions & 3 rubygems

Version Path
webruby-0.2.7 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
webruby-0.2.5 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
webruby-0.2.4 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
webruby-0.2.2 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
webruby-0.2.1 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
webruby-0.1.2 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
webruby-0.1.1 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
webruby-0.1.0 modules/emscripten/tools/node_modules/source-map/test/source-map/test-base64.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js
sprockets-browserify-0.2.0 node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js
ruby-wisp-source-0.8.0 vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/umd/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js
ruby-wisp-source-0.7.0 vendor/node_modules/browserify/node_modules/browser-pack/node_modules/combine-source-map/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js
sprockets-browserify-0.1.2 node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js
sprockets-browserify-0.1.0 node_modules/module-deps/node_modules/detective/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js