| 1 | #include <cgreen/cgreen.h> |
| 2 | #include <cgreen/mocks.h> |
| 3 | |
| 4 | void do_stuff(void *stream1, void *stream2) {} |
| 5 | |
| 6 | Describe(Streams); |
| 7 | BeforeEach(Streams) {} |
| 8 | AfterEach(Streams) {} |
| 9 | |
| 10 | static int stream_stub(void *stream) { |
| 11 | return (int)mock(stream); |
| 12 | } |
| 13 | |
| 14 | Ensure(Streams, bad_test) { |
| 15 | expect(stream_stub, will_return('a')); |
| 16 | do_stuff(&stream_stub, &stream_stub); |
| 17 | } |