mirror of
https://github.com/edmccard/twoapple-reboot.git
synced 2024-08-31 15:29:08 +00:00
Create cpu test subdirectory
This commit is contained in:
parent
674f525f37
commit
472d713473
@ -21,7 +21,7 @@ make GTKD=/path/to/gtkd DERELICT=/path/to/Derelict2
|
|||||||
There are tests for the 6502/65C02 emulation:
|
There are tests for the 6502/65C02 emulation:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd test
|
cd test/d6502
|
||||||
rdmd runtests.d --help
|
rdmd runtests.d --help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
-version=Benchmark -inline -release -O -noboundscheck -I.. -I../src
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
module test.base;
|
module test.d6502.base;
|
||||||
|
|
||||||
|
|
||||||
import std.algorithm, std.array, std.conv, std.exception, std.getopt,
|
import std.algorithm, std.array, std.conv, std.exception, std.getopt,
|
||||||
std.stdio, std.string;
|
std.stdio, std.string;
|
||||||
|
|
||||||
import test.cpu, test.opcodes;
|
import test.d6502.cpu, test.d6502.opcodes;
|
||||||
import cpu.data_d6502;
|
import cpu.data_d6502;
|
||||||
|
|
||||||
|
|
2
test/d6502/benchopts
Normal file
2
test/d6502/benchopts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
-version=Benchmark -inline -release -O -noboundscheck -I../.. -I../../src
|
||||||
|
|
@ -3,14 +3,14 @@
|
|||||||
* implementation, or that may be useful to any test which requires a
|
* implementation, or that may be useful to any test which requires a
|
||||||
* cpu (as opposed to testing the cpu itself).
|
* cpu (as opposed to testing the cpu itself).
|
||||||
*/
|
*/
|
||||||
module test.cpu;
|
module test.d6502.cpu;
|
||||||
|
|
||||||
|
|
||||||
import std.conv, std.exception, std.random, std.string, std.traits;
|
import std.conv, std.exception, std.random, std.string, std.traits;
|
||||||
|
|
||||||
public import cpu.d6502 : Cpu, is6502, is65C02;
|
public import cpu.d6502 : Cpu, is6502, is65C02;
|
||||||
|
|
||||||
import test.base : strict, cumulative;
|
import test.d6502.base : strict, cumulative;
|
||||||
|
|
||||||
|
|
||||||
// True if T is the type of a cpu.
|
// True if T is the type of a cpu.
|
@ -1,7 +1,7 @@
|
|||||||
module test.opcodes;
|
module test.d6502.opcodes;
|
||||||
|
|
||||||
|
|
||||||
import test.cpu;
|
import test.d6502.cpu;
|
||||||
|
|
||||||
|
|
||||||
// 2-cycle opcodes which neither read nor write.
|
// 2-cycle opcodes which neither read nor write.
|
@ -134,7 +134,8 @@ void runTest(OpDefs def, Tests test, string[] args)
|
|||||||
writeln("With strict=", s, " cumulative=", c);
|
writeln("With strict=", s, " cumulative=", c);
|
||||||
string cmdline = defStrings[def] ~ stStrings[s] ~ cmStrings[c] ~
|
string cmdline = defStrings[def] ~ stStrings[s] ~ cmStrings[c] ~
|
||||||
fNames[test] ~ join(args, " ");
|
fNames[test] ~ join(args, " ");
|
||||||
system("rdmd --force -I.. -I../src -version=RunTest " ~ cmdline);
|
system("rdmd --force -I../.. -I../../src -version=RunTest " ~
|
||||||
|
cmdline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
|
||||||
import test.base, test.cpu;
|
import test.d6502.base, test.d6502.cpu;
|
||||||
|
|
||||||
|
|
||||||
void main(string[] args)
|
void main(string[] args)
|
@ -1,6 +1,6 @@
|
|||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
|
||||||
import test.base, test.cpu;
|
import test.d6502.base, test.d6502.cpu;
|
||||||
|
|
||||||
|
|
||||||
void testDecimalMode(T)()
|
void testDecimalMode(T)()
|
@ -1,6 +1,6 @@
|
|||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
|
||||||
import test.base, test.cpu;
|
import test.d6502.base, test.d6502.cpu;
|
||||||
|
|
||||||
|
|
||||||
void main(string[] args)
|
void main(string[] args)
|
Loading…
Reference in New Issue
Block a user