Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_diff.c File Reference
#include "nilorea/n_common.h"
#include "nilorea/n_diff.h"
#include "nilorea/n_log.h"
#include "nilorea/n_str.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
Include dependency graph for ex_diff.c:

Go to the source code of this file.

Functions

static void expect_contains (const char *label, const N_STR *out, const char *needle)
static void expect_missing (const char *label, const N_STR *out, const char *needle)
static void expect_size (const char *label, size_t got, size_t want)
static void expect_true (const char *label, int cond)
static void expect_unified (const char *label, const char *a, const char *b, const char *want)
int main (int argc, char **argv)
static void process_args (int argc, char **argv)

Variables

static int failures = 0

Function Documentation

◆ expect_contains()

void expect_contains ( const char * label,
const N_STR * out,
const char * needle )
static
Examples
ex_diff.c, and ex_pretty.c.

Definition at line 83 of file ex_diff.c.

References N_STR::data, failures, LOG_ERR, and n_log.

Referenced by main().

Here is the caller graph for this function:

◆ expect_missing()

void expect_missing ( const char * label,
const N_STR * out,
const char * needle )
static
Examples
ex_diff.c.

Definition at line 91 of file ex_diff.c.

References N_STR::data, failures, LOG_ERR, and n_log.

Referenced by main().

Here is the caller graph for this function:

◆ expect_size()

void expect_size ( const char * label,
size_t got,
size_t want )
static
Examples
ex_diff.c.

Definition at line 76 of file ex_diff.c.

References failures, LOG_ERR, and n_log.

Referenced by main().

Here is the caller graph for this function:

◆ expect_true()

void expect_true ( const char * label,
int cond )
static

Definition at line 69 of file ex_diff.c.

References failures, LOG_ERR, and n_log.

◆ expect_unified()

void expect_unified ( const char * label,
const char * a,
const char * b,
const char * want )
static
Examples
ex_diff.c.

Definition at line 100 of file ex_diff.c.

References N_STR::data, failures, free_nstr, LOG_ERR, N_DIFF_CONTEXT_FULL, n_diff_lines(), n_diff_result_free(), n_diff_to_unified(), and n_log.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

◆ process_args()

void process_args ( int argc,
char ** argv )
static

Definition at line 39 of file ex_diff.c.

References LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_NOTICE, LOG_NULL, and set_log_level().

Here is the call graph for this function:

Variable Documentation

◆ failures

int failures = 0
static

Definition at line 36 of file ex_diff.c.