Commit f983a8cc authored by Yushin Washio's avatar Yushin Washio
Browse files

Now drone does a unit test!

parent 39a21f39
......@@ -2,3 +2,6 @@ build:
image: gcc
commands:
- make
- ./test.sh
branches:
- master
#include <string>
using namespace std;
class Person
{
public:
string hello()
{
return "Hi, how are you?";
}
};
#include <iostream>
#include <string>
#include "Person.h"
using namespace std;
class Person
{
public:
string hello()
{
return "Hi, how are you?";
}
};
int main (int argc, char *argv[])
{
Person drone;
......
#!/usr/bin/env sh
cd test
make
./test.o
all: test.o
test.o: test.cpp ../Person.h
$(CXX) -I../ -o $@ $<
clean:
-$(RM) *.o
#include <iostream>
#include <string>
#include <cassert>
#include "Person.h"
using namespace std;
int main (int argc, char *argv[])
{
Person drone;
assert(drone.hello() == "Hi, how are you?"); // Assert 001
cout << "drone: Assert 001 completed" << endl;
cout << "drone: All tests completed" << endl;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment