1 /* -*- Mode: js; js-indent-level: 2; -*- */
3 * Copyright 2011 Mozilla Foundation and contributors
4 * Licensed under the New BSD license. See LICENSE or:
5 * http://opensource.org/licenses/BSD-3-Clause
7 if (typeof define !== 'function') {
8 var define = require('amdefine')(module, require);
10 define(function (require, exports, module) {
12 var base64 = require('../../lib/source-map/base64');
14 exports['test out of range encoding'] = function (assert, util) {
15 assert.throws(function () {
18 assert.throws(function () {
23 exports['test out of range decoding'] = function (assert, util) {
24 assert.throws(function () {
29 exports['test normal encoding and decoding'] = function (assert, util) {
30 for (var i = 0; i < 64; i++) {
31 assert.equal(base64.decode(base64.encode(i)), i);