Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added example2 to Makefile after fixing it #3

Merged
merged 2 commits into from
Feb 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ STD=-ansi
CC=gcc
CFLAGS=$(STD) -Wall -Werror -Wno-unused -g

all: example
all: example example2

example: example.c ptest.c
$(CC) $(CFLAGS) $^ -o $@
./$@; [ $$? == 1 ]

example2: example2.c ptest.c
$(CC) $(CFLAGS) $^ -o $@
./$@; [ $$? == 1 ]

clean:
find . -regex ".*example\(\.exe\)*" | xargs rm
find . -regex ".*example\(2\)*\(\.exe\)*" | xargs rm
6 changes: 4 additions & 2 deletions example2.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <stdbool.h>

#include "ptest.h"

void test_maths(void) {
Expand All @@ -17,7 +19,7 @@ void test_strings(void) {
void test_stuff(void) {
PT_ASSERT(1);
PT_ASSERT(!0);
PT_ASSERT("string");
PT_ASSERT("string" != NULL);
}

void test_failure(void) {
Expand All @@ -38,4 +40,4 @@ int main(int argc, char** argv) {
pt_add_suite(suite_basic);
pt_add_suite(suite_other);
return pt_run();
}
}