mirror of https://github.com/pfusik/xasm.git
Silence unit tests.
This commit is contained in:
parent
cb92f715a9
commit
99099938b5
27
source/app.d
27
source/app.d
|
@ -765,11 +765,10 @@ void readValue() {
|
|||
valOpStack.length = 0;
|
||||
}
|
||||
|
||||
debug int testValue(string l) {
|
||||
version (unittest) int testValue(string l) {
|
||||
line = l;
|
||||
column = 0;
|
||||
readValue();
|
||||
writefln("Value of %s is %x", l, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -1033,11 +1032,10 @@ void readAbsoluteAddrMode() {
|
|||
addrMode = AddrMode.ABSOLUTE;
|
||||
}
|
||||
|
||||
debug AddrMode testAddrMode(string l) {
|
||||
version (unittest) AddrMode testAddrMode(string l) {
|
||||
line = l;
|
||||
column = 0;
|
||||
readAddrMode();
|
||||
writefln("Addressing mode of \"%s\" is %x", l, addrMode);
|
||||
return addrMode;
|
||||
}
|
||||
|
||||
|
@ -1175,10 +1173,10 @@ void listLabelTable() {
|
|||
}
|
||||
}
|
||||
|
||||
debug ubyte[] objectBuffer;
|
||||
version (unittest) ubyte[] objectBuffer;
|
||||
|
||||
void objectByte(ubyte b) {
|
||||
debug {
|
||||
version (unittest) {
|
||||
objectBuffer ~= b;
|
||||
} else {
|
||||
assert(pass2);
|
||||
|
@ -1234,11 +1232,11 @@ void putByte(ubyte b) {
|
|||
}
|
||||
}
|
||||
}
|
||||
debug {
|
||||
version (unittest) {
|
||||
objectByte(b);
|
||||
}
|
||||
if (pass2) {
|
||||
debug {
|
||||
version (unittest) {
|
||||
} else {
|
||||
objectByte(b);
|
||||
}
|
||||
|
@ -2639,15 +2637,11 @@ void assemblyInstruction(string instruction) {
|
|||
skipping = false;
|
||||
}
|
||||
|
||||
debug ubyte[] testInstruction(string l) {
|
||||
version (unittest) ubyte[] testInstruction(string l) {
|
||||
objectBuffer.length = 0;
|
||||
line = l;
|
||||
column = 0;
|
||||
assemblyInstruction(readInstruction());
|
||||
write(line, " assembles to");
|
||||
foreach (ubyte b; objectBuffer)
|
||||
writef(" %02x", b);
|
||||
writeln();
|
||||
return objectBuffer;
|
||||
}
|
||||
|
||||
|
@ -2684,9 +2678,6 @@ void assemblyPair() {
|
|||
}
|
||||
|
||||
void assemblyLine() {
|
||||
debug {
|
||||
writeln(line);
|
||||
}
|
||||
lineNo++;
|
||||
totalLines++;
|
||||
column = 0;
|
||||
|
@ -2940,6 +2931,9 @@ int main(string[] args) {
|
|||
exitCode = 3;
|
||||
sourceFilename = arg;
|
||||
}
|
||||
version (unittest)
|
||||
return 0;
|
||||
else {
|
||||
if (sourceFilename is null)
|
||||
exitCode = 3;
|
||||
if (!getOption('q'))
|
||||
|
@ -3020,3 +3014,4 @@ int main(string[] args) {
|
|||
}
|
||||
return exitCode;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue