+ All Categories
Home > Technology > Unit Testing Legacy C

Unit Testing Legacy C

Date post: 26-Jun-2015
Category:
Upload: michael-long
View: 2,280 times
Download: 1 times
Share this document with a friend
Description:
The slides from my lightning talk at the ACCU 2011 conference.
Popular Tags:
26
Unit Testing Legacy C Mike Long ACCU 2011
Transcript
Page 1: Unit Testing Legacy C

Unit Testing Legacy C

Mike Long ACCU 2011

Page 2: Unit Testing Legacy C
Page 3: Unit Testing Legacy C
Page 4: Unit Testing Legacy C
Page 5: Unit Testing Legacy C
Page 6: Unit Testing Legacy C

Use link seams!

Page 7: Unit Testing Legacy C

Use link seams!Lean on the #preprocessor!

Page 8: Unit Testing Legacy C
Page 9: Unit Testing Legacy C
Page 10: Unit Testing Legacy C
Page 11: Unit Testing Legacy C
Page 12: Unit Testing Legacy C
Page 13: Unit Testing Legacy C

Is there a better way?

Page 14: Unit Testing Legacy C

FakeFunctionFramework

https://github.com/meekrosoft/fff

Page 15: Unit Testing Legacy C

For Fake's Sake

Page 16: Unit Testing Legacy C

Function Call Counts!

Page 17: Unit Testing Legacy C

Function Call Sequence History!

Page 18: Unit Testing Legacy C

Specify Return Values!

Page 19: Unit Testing Legacy C

Return Value Sequences!

Page 20: Unit Testing Legacy C

Capture Argument History!

Page 21: Unit Testing Legacy C

how does this work?

Page 22: Unit Testing Legacy C
Page 23: Unit Testing Legacy C
Page 24: Unit Testing Legacy C
Page 25: Unit Testing Legacy C

#include "fff.h"

Page 26: Unit Testing Legacy C

#include "fff.h"

https://github.com/meekrosoft/fff


Recommended