Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix tests not building #14

Merged
merged 1 commit into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions tests_src/xmltoken_unittest.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,28 @@ window.testXmlVersionInfo = function() {
' version="1_1"' // Must be '1.1'
];

let regexp = new RegExp(XML10_VERSION_INFO);
for (let i = 0; i < okVersion10.length; i++) {
assertOk(`XML10_VERSION_INFO with ok #${i}`, regexp,
okVersion10[i], okVersion10[i]);
}
for (let i = 0; i < ngVersion10.length; i++) {
assertNg(`XML10_VERSION_INFO with ng #${i}`, regexp,
ngVersion10[i]);
}
let regexp = new RegExp(XML11_VERSION_INFO);
for (let i = 0; i < okVersion11.length; i++) {
assertOk(`XML11_VERSION_INFO with ok #${i}`, regexp,
okVersion11[i], okVersion11[i]);
}
for (let i = 0; i < ngVersion11.length; i++) {
assertNg(`XML11_VERSION_INFO with ng #${i}`, regexp,
ngVersion11[i]);
}
(() => {
let regexp = new RegExp(XML10_VERSION_INFO);
for (let i = 0; i < okVersion10.length; i++) {
assertOk(`XML10_VERSION_INFO with ok #${i}`, regexp,
okVersion10[i], okVersion10[i]);
}
for (let i = 0; i < ngVersion10.length; i++) {
assertNg(`XML10_VERSION_INFO with ng #${i}`, regexp,
ngVersion10[i]);
}
})();
(() => {
let regexp = new RegExp(XML11_VERSION_INFO);
for (let i = 0; i < okVersion11.length; i++) {
assertOk(`XML11_VERSION_INFO with ok #${i}`, regexp,
okVersion11[i], okVersion11[i]);
}
for (let i = 0; i < ngVersion11.length; i++) {
assertNg(`XML11_VERSION_INFO with ng #${i}`, regexp,
ngVersion11[i]);
}
})();
}

// Test XML_CHAR_REF.
Expand Down
49 changes: 26 additions & 23 deletions tests_src/xpath_unittest.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,17 +406,17 @@ const numExpr = [
foo: 100
}],
/* variables (Japanese) */
["$\u307b\u3052", '\u307b\u3048', {\
u307b\ u3052: '\u307b\u3048'
["$\u307b\u3052", '\u307b\u3048', {
\u307b\u3052: '\u307b\u3048'
}],
["$\u307b\u3052", 100, {\
u307b\ u3052: 100
["$\u307b\u3052", 100, {
\u307b\u3052: 100
}],
["$\u307b\u3052", true, {\
u307b\ u3052: true
["$\u307b\u3052", true, {
\u307b\u3052: true
}],
["$\u307b\u3052 + 1", 101, {\
u307b\ u3052: 100
["$\u307b\u3052 + 1", 101, {
\u307b\u3052: 100
}],
/* functions */
// function id() with string argument
Expand Down Expand Up @@ -599,21 +599,24 @@ function doTestEvalDom(xml, page, location, lat, latValue, lon, lonValue) {
assertEquals(slashPage, evalNodeSet(slashPage, ctx)[0].nodeName, page);
assertEquals(slashPage, evalNodeSet(slashPage, ctx1)[0].nodeName, page);

let n = evalNodeSet(slashPageLocationAtLat, ctx)[0];
assertEquals(slashPageLocationAtLat, n.nodeName, lat);
assertEquals(slashPageLocationAtLat, n.nodeValue, latValue);

n = evalNodeSet(slashPageLocationAtLat, ctx1)[0];
assertEquals(slashPageLocationAtLat, n.nodeName, lat);
assertEquals(slashPageLocationAtLat, n.nodeValue, latValue);

let n = evalNodeSet(slashPageLocationAtLon, ctx)[0];
assertEquals(slashPageLocationAtLon, n.nodeName, lon);
assertEquals(slashPageLocationAtLon, n.nodeValue, lonValue);

n = evalNodeSet(slashPageLocationAtLon, ctx1)[0];
assertEquals(slashPageLocationAtLon, n.nodeName, lon);
assertEquals(slashPageLocationAtLon, n.nodeValue, lonValue);
(() => {
let n = evalNodeSet(slashPageLocationAtLat, ctx)[0];
assertEquals(slashPageLocationAtLat, n.nodeName, lat);
assertEquals(slashPageLocationAtLat, n.nodeValue, latValue);

n = evalNodeSet(slashPageLocationAtLat, ctx1)[0];
assertEquals(slashPageLocationAtLat, n.nodeName, lat);
assertEquals(slashPageLocationAtLat, n.nodeValue, latValue);
})();
(() => {
let n = evalNodeSet(slashPageLocationAtLon, ctx)[0];
assertEquals(slashPageLocationAtLon, n.nodeName, lon);
assertEquals(slashPageLocationAtLon, n.nodeValue, lonValue);

n = evalNodeSet(slashPageLocationAtLon, ctx1)[0];
assertEquals(slashPageLocationAtLon, n.nodeName, lon);
assertEquals(slashPageLocationAtLon, n.nodeValue, lonValue);
})();
}

window.testXMLValueAcrossBrowsers = function() {
Expand Down