michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: function assertEqArray(actual, expected) { michael@0: if (actual.length != expected.length) { michael@0: throw new Error( michael@0: "array lengths not equal: got " + michael@0: uneval(actual) + ", expected " + uneval(expected)); michael@0: } michael@0: michael@0: for (var i = 0; i < actual.length; ++i) { michael@0: if (actual[i] != expected[i]) { michael@0: throw new Error( michael@0: "arrays not equal at element " + i + ": got " + michael@0: uneval(actual) + ", expected " + uneval(expected)); michael@0: } michael@0: } michael@0: } michael@0: michael@0: