Simplified the NODE tests

This commit is contained in:
Jeff Parsons 2015-09-16 15:32:49 -07:00
commit 646acf3a8d
53 changed files with 106 additions and 89 deletions

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var usr = require("../../shared/lib/usrlib");
var Component = require("../../shared/lib/component");
@ -1681,4 +1681,4 @@ Bus.prototype.reportError = function(op, addr, size)
return false;
};
if (typeof module !== 'undefined') module.exports = Bus;
if (NODE) module.exports = Bus;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var usr = require("../../shared/lib/usrlib");
var web = require("../../shared/lib/weblib");
@ -5293,4 +5293,4 @@ ChipSet.init = function()
*/
web.onInit(ChipSet.init);
if (typeof module !== 'undefined') module.exports = ChipSet;
if (NODE) module.exports = ChipSet;

View file

@ -65,7 +65,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var usr = require("../../shared/lib/usrlib");
var web = require("../../shared/lib/weblib");
@ -1399,4 +1399,4 @@ web.onInit(Computer.init);
web.onShow(Computer.show);
web.onExit(Computer.exit);
if (typeof module !== 'undefined') module.exports = Computer;
if (NODE) module.exports = Computer;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var usr = require("../../shared/lib/usrlib");
var Component = require("../../shared/lib/component");
@ -1167,4 +1167,4 @@ CPU.prototype.yieldCPU = function()
this.updateCPU();
};
if (typeof module !== 'undefined') module.exports = CPU;
if (NODE) module.exports = CPU;

View file

@ -33,7 +33,7 @@
"use strict";
if (DEBUGGER) {
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var usr = require("../../shared/lib/usrlib");
var web = require("../../shared/lib/weblib");
@ -1567,7 +1567,7 @@ if (DEBUGGER) {
* AX == 0 means handle fault normally, 1 means issue TRAPFAULT
*/
cpu.regEAX = (cpu.regEAX & ~0xffff) | (this.fIgnoreNextCheckFault? 0 : 1);
if (DEBUG) this.println("INT 0x41 CHECKFAULT: fault=" + str.toHexWord(BX) + " type=" + str.toHexWord(CX) + " trapped=" + !this.fIgnoreNextCheckFault);
if (DEBUG) this.println("INT 0x41 CHECKFAULT: fault=" + str.toHexWord(BX) + " type=" + str.toHexWord(CX) + " trap=" + !this.fIgnoreNextCheckFault);
}
break;
@ -7514,7 +7514,7 @@ if (DEBUGGER) {
* Used with any command (eg, "r") that allows but doesn't require whitespace between command and first argument.
*
* @this {Debugger}
* @param {Array.<string>} [asArgs]
* @param {Array.<string>} asArgs
* @return {Array.<string>}
*/
Debugger.prototype.shiftArgs = function(asArgs)
@ -7730,4 +7730,4 @@ if (DEBUGGER) {
} // endif DEBUGGER
if (typeof module !== 'undefined') module.exports = Debugger;
if (NODE) module.exports = Debugger;

View file

@ -154,7 +154,7 @@ var COMPAQ386 = true;
*/
var PAGEBLOCKS = I386;
if (typeof module !== 'undefined') {
if (NODE) {
global.PCJSCLASS = PCJSCLASS;
global.DEBUGGER = DEBUGGER;
global.PREFETCH = PREFETCH;

View file

@ -156,7 +156,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var usr = require("../../shared/lib/usrlib");
var web = require("../../shared/lib/weblib");
@ -2769,4 +2769,4 @@ Disk.prototype.dumpSector = function(sector, pba, sDesc)
return sDump;
};
if (typeof module !== 'undefined') module.exports = Disk;
if (NODE) module.exports = Disk;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var DiskAPI = require("../../shared/lib/diskapi");
@ -2499,4 +2499,4 @@ FDC.init = function() {
*/
web.onInit(FDC.init);
if (typeof module !== 'undefined') module.exports = FDC;
if (NODE) module.exports = FDC;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var DiskAPI = require("../../shared/lib/diskapi");
@ -2910,4 +2910,4 @@ HDC.init = function()
*/
web.onInit(HDC.init);
if (typeof module !== 'undefined') module.exports = HDC;
if (NODE) module.exports = HDC;

View file

@ -2033,4 +2033,4 @@ if (DEBUGGER) {
* entries for 16 segments.
*/
if (typeof module !== 'undefined') module.exports = Interrupts;
if (NODE) module.exports = Interrupts;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var Component = require("../../shared/lib/component");
@ -2253,4 +2253,4 @@ Keyboard.init = function()
*/
web.onInit(Keyboard.init);
if (typeof module !== 'undefined') module.exports = Keyboard;
if (NODE) module.exports = Keyboard;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var Component = require("../../shared/lib/component");
var Messages = require("./messages");
@ -1334,4 +1334,4 @@ if (TYPEDARRAYS) {
Memory.afnLittleEndian = [Memory.prototype.readByteLittleEndian, Memory.prototype.readShortLittleEndian, Memory.prototype.readLongLittleEndian, Memory.prototype.writeByteLittleEndian, Memory.prototype.writeShortLittleEndian, Memory.prototype.writeLongLittleEndian];
}
if (typeof module !== 'undefined') module.exports = Memory;
if (NODE) module.exports = Memory;

View file

@ -83,4 +83,4 @@ var Messages = {
HALT: 0x80000000|0
};
if (typeof module !== 'undefined') module.exports = Messages;
if (NODE) module.exports = Messages;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var Component = require("../../shared/lib/component");
@ -731,4 +731,4 @@ Mouse.init = function()
*/
web.onInit(Mouse.init);
if (typeof module !== 'undefined') module.exports = Mouse;
if (NODE) module.exports = Mouse;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var usr = require("../../shared/lib/usrlib");
var web = require("../../shared/lib/weblib");
@ -987,4 +987,4 @@ Panel.init = function()
*/
web.onInit(Panel.init);
if (typeof module !== 'undefined') module.exports = Panel;
if (NODE) module.exports = Panel;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var Component = require("../../shared/lib/component");
@ -590,4 +590,4 @@ CompaqController.prototype.getMemoryAccess = function()
*/
web.onInit(RAM.init);
if (typeof module !== 'undefined') module.exports = RAM;
if (NODE) module.exports = RAM;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var DumpAPI = require("../../shared/lib/dumpapi");
@ -419,4 +419,4 @@ ROM.init = function()
*/
web.onInit(ROM.init);
if (typeof module !== 'undefined') module.exports = ROM;
if (NODE) module.exports = ROM;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var web = require("../../shared/lib/weblib");
var Component = require("../../shared/lib/component");
var Messages = require("./messages");
@ -837,4 +837,4 @@ SerialPort.init = function()
*/
web.onInit(SerialPort.init);
if (typeof module !== 'undefined') module.exports = SerialPort;
if (NODE) module.exports = SerialPort;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var web = require("./../../shared/lib/weblib");
var Component = require("./../../shared/lib/component");
var Messages = require("./messages");
@ -414,4 +414,4 @@ State.prototype = {
}
};
if (typeof module !== 'undefined') module.exports = State;
if (NODE) module.exports = State;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var DumpAPI = require("../../shared/lib/dumpapi");
@ -7061,4 +7061,4 @@ Video.init = function()
*/
web.onInit(Video.init);
if (typeof module !== 'undefined') module.exports = Video;
if (NODE) module.exports = Video;

View file

@ -535,4 +535,4 @@ X86.PS_SAHF = (X86.PS.CF | X86.PS.PF | X86.PS.AF | X86.PS.ZF | X86.PS.SF);
*/
X86.OPFLAG_PREFIXES = (X86.OPFLAG.SEG | X86.OPFLAG.LOCK | X86.OPFLAG.REPZ | X86.OPFLAG.REPNZ | X86.OPFLAG.DATASIZE | X86.OPFLAG.ADDRSIZE);
if (typeof module !== 'undefined') module.exports = X86;
if (NODE) module.exports = X86;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var web = require("../../shared/lib/weblib");
var Component = require("../../shared/lib/component");
@ -48,11 +48,11 @@ if (typeof module !== 'undefined') {
if (!I386) {
/*
* These are the original ModRM decoders, which were simpler and faster because they could treat all
* word instructions as 16-bit, assume bits 15-31 of all registers were always zero, and use masking
* word instructions as 16-bit, assume bits 16-31 of all registers were always zero, and use masking
* constants instead of variables. If I386 is enabled, these decoders are not used, and the compiler
* will eliminate them from the compiled code.
*/
if (typeof module !== 'undefined') {
if (NODE) {
var X86ModB = require("./x86modb");
var X86ModW = require("./x86modw");
}
@ -61,7 +61,7 @@ if (!I386) {
* These are the more general-purpose ModRM decoders, required for I386 support. The current addressing
* mode (16-bit or 32-bit) dynamically selects the appropriate set of decoders.
*/
if (typeof module !== 'undefined') {
if (NODE) {
var X86ModB16 = require("./x86modb16");
var X86ModW16 = require("./x86modw16");
var X86ModB32 = require("./x86modb32");
@ -4698,4 +4698,4 @@ X86CPU.init = function()
*/
web.onInit(X86CPU.init);
if (typeof module !== 'undefined') module.exports = X86CPU;
if (NODE) module.exports = X86CPU;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var Messages = require("./messages");
var X86 = require("./x86");

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}
@ -8439,4 +8439,4 @@ X86ModB.aOpModGrp = [
}
];
if (typeof module !== 'undefined') module.exports = X86ModB;
if (NODE) module.exports = X86ModB;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}
@ -8439,4 +8439,4 @@ X86ModB16.aOpModGrp = [
}
];
if (typeof module !== 'undefined') module.exports = X86ModB16;
if (NODE) module.exports = X86ModB16;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}
@ -8439,4 +8439,4 @@ X86ModB32.aOpModGrp = [
}
];
if (typeof module !== 'undefined') module.exports = X86ModB32;
if (NODE) module.exports = X86ModB32;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}
@ -2391,4 +2391,4 @@ X86ModSIB.aOpModSIB = [
}
];
if (typeof module !== 'undefined') module.exports = X86ModSIB;
if (NODE) module.exports = X86ModSIB;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}
@ -9010,4 +9010,4 @@ X86ModW.aOpModGrp = [
}
];
if (typeof module !== 'undefined') module.exports = X86ModW;
if (NODE) module.exports = X86ModW;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}
@ -9330,4 +9330,4 @@ X86ModW16.aOpModGrp = [
}
];
if (typeof module !== 'undefined') module.exports = X86ModW16;
if (NODE) module.exports = X86ModW16;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}
@ -9330,4 +9330,4 @@ X86ModW32.aOpModGrp = [
}
];
if (typeof module !== 'undefined') module.exports = X86ModW32;
if (NODE) module.exports = X86ModW32;

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var X86 = require("./x86");
}

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var Component = require("../../shared/lib/component");
var Messages = require("./messages");

View file

@ -32,7 +32,7 @@
"use strict";
if (typeof module !== 'undefined') {
if (NODE) {
var str = require("../../shared/lib/strlib");
var Messages = require("./messages");
var Memory = require("./memory");
@ -1565,4 +1565,4 @@ X86Seg.prototype.messageSeg = function(sel, base, limit, type, ext)
}
};
if (typeof module !== 'undefined') module.exports = X86Seg;
if (NODE) module.exports = X86Seg;