projects
/
wenboi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4d70a9
)
Verificacion de argumentos en test_core
author
slack
<slack@ommadawn.(none)>
Sat, 21 Jun 2008 22:40:02 +0000
(
00:40
+0200)
committer
slack
<slack@ommadawn.(none)>
Sat, 21 Jun 2008 22:40:02 +0000
(
00:40
+0200)
Makefile
patch
|
blob
|
history
tests/test_core.cc
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index 71704cf0ad7a35a9513a6aed10c2265572f3eb3f..0c67d3765fd49f55380139c2e55d7317a9f70985 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-2,7
+2,7
@@
CXXFLAGS=-g -Wall -Weffc++ -Wstrict-null-sentinel -Wold-style-cast \
-Woverloaded-virtual
LDFLAGS=-g
-all:
gbcore.o MBC.o GBMemory.o GBRom.o GBVideo.o
+all:
tests
tests: tests/test_gbrom tests/test_core
diff --git
a/tests/test_core.cc
b/tests/test_core.cc
index 6a6b257b5427f3a9ee2f091b8ae2add2bbc2a146..5518065e8cb2b4e9ff89d17e65393273cf4b96b9 100644
(file)
--- a/
tests/test_core.cc
+++ b/
tests/test_core.cc
@@
-1,13
+1,16
@@
#include "../gbcore.h"
#include <iostream>
+#include <cstdlib>
int main(int argc, char **argv)
{
+ if (argc != 2) {
+ std::cerr << "Usage: " << argv[0] << " rom_file" << std::endl;
+ exit(EXIT_FAILURE);
+ }
GameBoy gb(argv[1]);
while(1)
{
gb.run_cycle();
}
-
-
}