Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: qunit/tests/versionComparator.js

Issue 29452181: Noissue - Merge current tip to Edge bookmark (Closed)
Patch Set: Created May 30, 2017, 3:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « qunit/tests/url.js ('k') | stats.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: qunit/tests/versionComparator.js
===================================================================
--- a/qunit/tests/versionComparator.js
+++ b/qunit/tests/versionComparator.js
@@ -1,6 +1,6 @@
/*
* This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2016 Eyeo GmbH
+ * Copyright (C) 2006-2017 eyeo GmbH
*
* Adblock Plus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -15,17 +15,23 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
+/* globals Cu */
+
"use strict";
+(function()
{
- let compare = Services.vc.compare;
+ const {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
+ const {compare} = Services.vc;
function allPairs(array)
{
let pairs = [];
for (let i = 0; i < array.length - 1; i++)
+ {
for (let j = i + 1; j < array.length; j++)
pairs.push([array[i], array[j]]);
+ }
return pairs;
}
@@ -87,7 +93,7 @@
"1.1pre1",
"1.1pre10a",
["1.1pre10", "1.1pre010"],
- ["1.10", "1.010", "1.00010"],
+ ["1.10", "1.010", "1.00010"]
];
examples.forEach(example =>
@@ -101,8 +107,10 @@
let v1 = [].concat(pair[0]);
let v2 = [].concat(pair[1]);
for (let i = 0; i < v1.length; i++)
+ {
for (let j = 0; j < v2.length; j++)
versionSmaller(v1[i], v2[j]);
+ }
});
});
-}
+}());
« no previous file with comments | « qunit/tests/url.js ('k') | stats.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld