summaryrefslogtreecommitdiff
path: root/pgm1/makefile
blob: 7be689d932c19ebb8348cc794249eaf7d0dd9885 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
all: beetle

beetle: beetle.c
	gcc -Wall -o beetle beetle.c -lm

debug: beetle.c
	gcc -Wall -o -g beetle beetle.c -lm

clean: 
	rm -f beetle

test:
	gcc -Wall -o beetle beetle.c -lm
	
	# standard test case
	./beetle 10 10000
	
	# too many/too few inputs
	-./beetle 10
	-./beetle 10 10 10 
	
	# negatives
	-./beetle -10 10000
	-./beetle 10 -10000
	
	# non-number characters
	-./beetle abc 10000
	-./beetle 10 abc
	
	# really big numbers
	-./beetle 2147483647 2
	-./beetle 2 2147483647
	
	# overflow
	-./beetle 10 100000000000000000000000000000
	-./beetle 100000000000000000000000000000 2