MOS Source Code
Loading...
Searching...
No Matches
mem_release.c File Reference
#include <pb_decode.h>
#include <pb_encode.h>
#include <malloc_wrappers.h>
#include <stdio.h>
#include <test_helpers.h>
#include "mem_release.pb.h"
+ Include dependency graph for mem_release.c:

Go to the source code of this file.

Macros

#define TEST(x)
 

Functions

static void fill_TestMessage (TestMessage *msg)
 
static bool test_TestMessage ()
 
static bool test_OneofMessage ()
 
static bool dummy_decode_cb (pb_istream_t *stream, const pb_field_t *field, void **arg)
 
static bool test_Garbage ()
 
int main ()
 

Variables

static char * test_str_arr [] = {"1", "2", ""}
 
static SubMessage test_msg_arr [] = {SubMessage_init_zero, SubMessage_init_zero}
 
static pb_extension_t ext1
 
static pb_extension_t ext2
 

Macro Definition Documentation

◆ TEST

#define TEST ( x)
Value:
if (!(x)) { \
fprintf(stderr, "Test %s on line %d failed.\n", #x, __LINE__); \
return false; \
}
#define stderr
Definition mos_stdio.h:32

Definition at line 10 of file mem_release.c.

Referenced by test_Garbage(), test_OneofMessage(), and test_TestMessage().

Function Documentation

◆ fill_TestMessage()

static void fill_TestMessage ( TestMessage * msg)
static

Definition at line 19 of file mem_release.c.

Referenced by test_OneofMessage(), and test_TestMessage().

◆ test_TestMessage()

static bool test_TestMessage ( )
static

Definition at line 43 of file mem_release.c.

Referenced by main().

+ Here is the call graph for this function:

◆ test_OneofMessage()

static bool test_OneofMessage ( )
static

Definition at line 114 of file mem_release.c.

Referenced by main().

+ Here is the call graph for this function:

◆ dummy_decode_cb()

static bool dummy_decode_cb ( pb_istream_t * stream,
const pb_field_t * field,
void ** arg )
static

Definition at line 205 of file mem_release.c.

Referenced by test_Garbage().

◆ test_Garbage()

static bool test_Garbage ( )
static

Definition at line 211 of file mem_release.c.

Referenced by main().

+ Here is the call graph for this function:

◆ main()

int main ( void )

Definition at line 239 of file mem_release.c.

+ Here is the call graph for this function:

Variable Documentation

◆ test_str_arr

char* test_str_arr[] = {"1", "2", ""}
static

Definition at line 15 of file mem_release.c.

Referenced by fill_TestMessage().

◆ test_msg_arr

Definition at line 16 of file mem_release.c.

Referenced by fill_TestMessage().

◆ ext1

pb_extension_t ext1
static

Definition at line 17 of file mem_release.c.

Referenced by fill_TestMessage(), main(), and test_TestMessage().

◆ ext2

pb_extension_t ext2
static

Definition at line 17 of file mem_release.c.

Referenced by fill_TestMessage(), main(), and test_TestMessage().