mirror of
https://github.com/ptitSeb/box86.git
synced 2024-11-27 00:40:24 +00:00
Preparing more tests
This commit is contained in:
parent
c0e7a3da58
commit
4fd8951189
@ -51,4 +51,19 @@ target_link_libraries(box86 m dl rt)
|
||||
add_test(test01 ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/box86
|
||||
-D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test01 -D TEST_OUTPUT=tmpfile.txt
|
||||
-D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref01.txt
|
||||
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
||||
-P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
||||
|
||||
#add_test(test02 ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/box86
|
||||
# -D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test02 -D TEST_OUTPUT=tmpfile.txt
|
||||
# -D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref02.txt
|
||||
# -P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
||||
|
||||
#add_test(test03 ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/box86
|
||||
# -D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test03 -D TEST_OUTPUT=tmpfile.txt
|
||||
# -D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref03.txt
|
||||
# -P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
||||
|
||||
#add_test(test01 ${CMAKE_COMMAND} -D TEST_PROGRAM=${CMAKE_BINARY_DIR}/box86
|
||||
# -D TEST_ARGS=${CMAKE_SOURCE_DIR}/tests/test04 yeah -D TEST_OUTPUT=tmpfile.txt
|
||||
# -D TEST_REFERENCE=${CMAKE_SOURCE_DIR}/tests/ref04.txt
|
||||
# -P ${CMAKE_SOURCE_DIR}/runTest.cmake )
|
1
tests/ref02.txt
Normal file
1
tests/ref02.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello World!
|
1
tests/ref03.txt
Normal file
1
tests/ref03.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello World!
|
1
tests/ref04.txt
Normal file
1
tests/ref04.txt
Normal file
@ -0,0 +1 @@
|
||||
Hello, argc=2, argv[0]=./test04, argv[1]=yeah
|
0
tests/test01.c
Executable file → Normal file
0
tests/test01.c
Executable file → Normal file
BIN
tests/test02
Executable file
BIN
tests/test02
Executable file
Binary file not shown.
9
tests/test02.c
Normal file
9
tests/test02.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const char msg[] = "Hello World!\n";
|
||||
syscall(4, STDOUT_FILENO, msg, sizeof(msg)-1);
|
||||
return 0;
|
||||
}
|
BIN
tests/test03
Executable file
BIN
tests/test03
Executable file
Binary file not shown.
7
tests/test03.c
Normal file
7
tests/test03.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
BIN
tests/test04
Executable file
BIN
tests/test04
Executable file
Binary file not shown.
7
tests/test04.c
Executable file
7
tests/test04.c
Executable file
@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
printf("Hello, argc=%d, argv[0]=%s, argv[%d]=%s\n", argc, argv[0], argc-1, argv[argc-1]);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user