Submit Search
Introduction to TDD in C
0 likes
155 views
R
Raphael Frauenknecht
How to use test-driven development in C as beginner in programming
Software
Read more
1 of 32
Download now
Download to read offline
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
More Related Content
What's hot
(20)
DOCX
Trabajo de programacion
Instituto Tecnologico Superior de Informatica "Ibarra"
PDF
Bcsl 033 data and file structures lab s4-3
Dr. Loganathan R
PDF
Bcsl 033 data and file structures lab s1-2
Dr. Loganathan R
DOCX
Metodos Numericos
andres felipe chamorro
DOCX
Program to remove Left factoring
Shraddha Patel
DOCX
質數的判斷
Hui-Shih Leng
DOCX
(Meta 4) ejemplo calcular la mitad de un numero dev c++
Eli Diaz
PDF
Bubble sort
Hitesh Kumar
DOCX
B.f.s
MDFERDOUSAHMED
DOCX
Nova microsoft word document
Saša Ličina
PDF
Union
archana chitte
DOC
Ejercicios.
Jose Dani
DOCX
program sederhana
muhammadalfin03
DOCX
Simulacion - Algoritmo congruencial cuadratico
José Antonio Sandoval Acosta
TXT
Bancocic
edgarflores28
DOCX
Daniel snake
Tefaa Salazar
DOCX
Prueba de montecarlo
Gonzalo Negrete Montaño
PDF
งาน#2
Bam'nunnaput Sabangban
DOCX
Rafael vasquez
Rafael Vasquez
PDF
Programming in C
Vineet Kumar Saini
Trabajo de programacion
Instituto Tecnologico Superior de Informatica "Ibarra"
Bcsl 033 data and file structures lab s4-3
Dr. Loganathan R
Bcsl 033 data and file structures lab s1-2
Dr. Loganathan R
Metodos Numericos
andres felipe chamorro
Program to remove Left factoring
Shraddha Patel
質數的判斷
Hui-Shih Leng
(Meta 4) ejemplo calcular la mitad de un numero dev c++
Eli Diaz
Bubble sort
Hitesh Kumar
B.f.s
MDFERDOUSAHMED
Nova microsoft word document
Saša Ličina
Union
archana chitte
Ejercicios.
Jose Dani
program sederhana
muhammadalfin03
Simulacion - Algoritmo congruencial cuadratico
José Antonio Sandoval Acosta
Bancocic
edgarflores28
Daniel snake
Tefaa Salazar
Prueba de montecarlo
Gonzalo Negrete Montaño
งาน#2
Bam'nunnaput Sabangban
Rafael vasquez
Rafael Vasquez
Programming in C
Vineet Kumar Saini
Viewers also liked
(14)
PPTX
3Com 3C18241
savomir
PPTX
Presentación dgcp mesicic
Manu Gonzalez Caballero
PDF
Magnus lönnbergprofile
Magnus Lönnberg
PPTX
Gender selection
genderselectionaustralia
PPTX
3Com 3CBLSF50-ME
savomir
PPTX
3Com 10002220 REV AB
savomir
PPTX
A donde van a parar
Ana Varon
PPTX
Misión leonardo
leonardoramirez7271
PPT
Untitled-10
olenaterekha
PPTX
Builders in ahmedabad
PropChill
PPTX
3Com 3CR17333A-91
savomir
PPTX
3Com 1697-060-000-2.00
savomir
PPTX
Cuenta atras
segundociclocm
DOCX
Proyecto de extraordinario informatica
Luis Guzmán
3Com 3C18241
savomir
Presentación dgcp mesicic
Manu Gonzalez Caballero
Magnus lönnbergprofile
Magnus Lönnberg
Gender selection
genderselectionaustralia
3Com 3CBLSF50-ME
savomir
3Com 10002220 REV AB
savomir
A donde van a parar
Ana Varon
Misión leonardo
leonardoramirez7271
Untitled-10
olenaterekha
Builders in ahmedabad
PropChill
3Com 3CR17333A-91
savomir
3Com 1697-060-000-2.00
savomir
Cuenta atras
segundociclocm
Proyecto de extraordinario informatica
Luis Guzmán
Ad
Introduction to TDD in C
4.
1.
5.
1. 2.
6.
1. 2. 3.
7.
1. 2. 3. 4.
8.
1. 2. 3. 4. 5.
9.
1. 2. 3. 4. 5.
10.
1. 2. 3. 4. 5.
16.
int sum_of_multiples(int border){ int
sum = 0; // calculate something return sum; }
17.
void test(int output,int
expected){ if(output == expected) printf("Test:t successn"); else printf("Test:t failn"); }
18.
int main(void){ test(sum_of_multiples(4),3); return 0; }
20.
int sum_of_multiples(int border){ int
sum = 0; // calculate something for(int i=1; i<border; i++){ if(i%3==0) sum += i; } return sum; }
22.
• • •
23.
int sumMultiplesOf3and5(int border){ int
sum = 0; // calculate something for(int i=1; i<border; i++){ if(i%3==0) sum += i; } return sum; }
24.
int sumMultiplesOf3and5(int border){ int
sum = 0; for(int i=1; i<border; i++){ if(i%3==0) sum += i; } return sum; }
26.
int main(void){ test(sumMultiplesOf3and5(4),3); test(sumMultiplesOf3and5(10),21); return 0; }
28.
int sumMultiplesOf3and5(int border){ int
sum = 0; for(int i=1; i<border; i++){ if(i%3==0 || i%5==0) sum += i; } return sum; }
30.
int main(void){ test(sumMultiplesOf3and5(4),3); test(sumMultiplesOf3and5(10),21); test(sumMultiplesOf3and5(100),2318); return 0; }
Download