Advertisement
Guest User

helper.c

a guest
Jan 21st, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. // helper.c
  2. static int thing = 0;
  3.  
  4. int get_thing (void) {
  5.     return thing;
  6. }
  7.  
  8. int do_thing (void) { // do_thing is called by set_thing. This is what I want to mock out
  9.     return thing;
  10. }
  11.  
  12. int set_thing (int x) {
  13.     thing = x;
  14.     return do_thing()
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement