From c984ce1fd09ac4d9cdb2ea642a58344a9ebeb0d7 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 29 May 2011 19:40:07 -0700 Subject: [PATCH] force restart --- basics/Makefile | 5 ++++- basics/src/hello-world.cpp | 5 +++-- basics/tests/test_hello_world | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 basics/tests/test_hello_world diff --git a/basics/Makefile b/basics/Makefile index 1e5722a..26792f4 100644 --- a/basics/Makefile +++ b/basics/Makefile @@ -12,5 +12,8 @@ all: $(ALL_TARGETS) clean: rm -vf ./bin/* +test: + ./tests/test_hello_world -.PHONY: all clean + +.PHONY: all clean test diff --git a/basics/src/hello-world.cpp b/basics/src/hello-world.cpp index 98a934e..29feca2 100644 --- a/basics/src/hello-world.cpp +++ b/basics/src/hello-world.cpp @@ -1,7 +1,8 @@ -#include +#include +using namespace std; int main() { - printf("Hello World!\n"); + cout << "Hello World!" << endl; return 0; } diff --git a/basics/tests/test_hello_world b/basics/tests/test_hello_world new file mode 100755 index 0000000..c3d3d0e --- /dev/null +++ b/basics/tests/test_hello_world @@ -0,0 +1,5 @@ +#!/bin/bash + +./bin/hello-world > /dev/null 2>&1 + +exit $?