mirror of
https://github.com/criyle/go-sandbox.git
synced 2025-09-26 23:19:11 +08:00
test: makefile for test
This commit is contained in:
parent
6407c89d90
commit
d58b2485a2
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,7 +2,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# Test Env
|
# Test Env
|
||||||
test*/
|
|
||||||
env*.sh
|
env*.sh
|
||||||
|
|
||||||
# Test Files
|
# Test Files
|
||||||
@ -11,3 +10,4 @@ env*.sh
|
|||||||
|
|
||||||
.vscode
|
.vscode
|
||||||
runprog
|
runprog
|
||||||
|
*.test
|
||||||
|
10
test_c/Makefile
Normal file
10
test_c/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
all: helloworld/main.test nonzeroexit/main.test
|
||||||
|
|
||||||
|
helloworld/main.test: helloworld/main.cpp
|
||||||
|
g++ helloworld/main.cpp -o helloworld/main.test
|
||||||
|
|
||||||
|
nonzeroexit/main.test: nonzeroexit/main.cpp
|
||||||
|
g++ nonzeroexit/main.cpp -o nonzeroexit/main.test
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf helloworld/*.test nonzeroexit/*.test
|
6
test_c/helloworld/main.cpp
Normal file
6
test_c/helloworld/main.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include<iostream>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::cout << "Hello, world" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
3
test_c/nonzeroexit/main.cpp
Normal file
3
test_c/nonzeroexit/main.cpp
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
int main() {
|
||||||
|
return 100;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user