File: multiple_streams1.c

package info (click to toggle)
cgreen 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,400 kB
  • sloc: ansic: 11,064; makefile: 417; cpp: 401; sh: 327; python: 177; xml: 33; sed: 8
file content (17 lines) | stat: -rw-r--r-- 354 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <cgreen/cgreen.h>
#include <cgreen/mocks.h>

void do_stuff(void *stream1, void *stream2) {}

Describe(Streams);
BeforeEach(Streams) {}
AfterEach(Streams) {}

static int stream_stub(void *stream) {
    return (int)mock(stream);
}

Ensure(Streams, bad_test) {
    expect(stream_stub, will_return('a'));
    do_stuff(&stream_stub, &stream_stub);
}