klee
KTest.cpp File Reference
#include "klee/ADT/KTest.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Include dependency graph for KTest.cpp:

Go to the source code of this file.

Macros

#define KTEST_VERSION   3
 
#define KTEST_MAGIC_SIZE   5
 
#define KTEST_MAGIC   "KTEST"
 
#define BOUT_MAGIC   "BOUT\n"
 

Functions

static int read_uint32 (FILE *f, unsigned *value_out)
 
static int write_uint32 (FILE *f, unsigned value)
 
static int read_string (FILE *f, char **value_out)
 
static int write_string (FILE *f, const char *value)
 
unsigned kTest_getCurrentVersion ()
 
static int kTest_checkHeader (FILE *f)
 
int kTest_isKTestFile (const char *path)
 
KTestkTest_fromFile (const char *path)
 
int kTest_toFile (KTest *bo, const char *path)
 
unsigned kTest_numBytes (KTest *bo)
 
void kTest_free (KTest *bo)
 

Macro Definition Documentation

◆ BOUT_MAGIC

#define BOUT_MAGIC   "BOUT\n"

Definition at line 21 of file KTest.cpp.

◆ KTEST_MAGIC

#define KTEST_MAGIC   "KTEST"

Definition at line 18 of file KTest.cpp.

◆ KTEST_MAGIC_SIZE

#define KTEST_MAGIC_SIZE   5

Definition at line 17 of file KTest.cpp.

◆ KTEST_VERSION

#define KTEST_VERSION   3

Definition at line 16 of file KTest.cpp.

Function Documentation

◆ kTest_checkHeader()

static int kTest_checkHeader ( FILE *  f)
static

Definition at line 72 of file KTest.cpp.

References BOUT_MAGIC, KTEST_MAGIC, and KTEST_MAGIC_SIZE.

Referenced by kTest_fromFile(), and kTest_isKTestFile().

Here is the caller graph for this function:

◆ kTest_free()

void kTest_free ( KTest bo)

Definition at line 229 of file KTest.cpp.

References KTest::args, KTestObject::bytes, KTestObject::name, KTest::numArgs, KTest::numObjects, and KTest::objects.

Referenced by main().

Here is the caller graph for this function:

◆ kTest_fromFile()

KTest * kTest_fromFile ( const char *  path)

Definition at line 94 of file KTest.cpp.

References KTest::args, KTestObject::bytes, kTest_checkHeader(), kTest_getCurrentVersion(), KTestObject::name, KTest::numArgs, KTestObject::numBytes, KTest::numObjects, KTest::objects, read_string(), read_uint32(), KTest::symArgvLen, KTest::symArgvs, and KTest::version.

Referenced by main().

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

◆ kTest_getCurrentVersion()

unsigned kTest_getCurrentVersion ( )

Definition at line 67 of file KTest.cpp.

References KTEST_VERSION.

Referenced by kTest_fromFile().

Here is the caller graph for this function:

◆ kTest_isKTestFile()

int kTest_isKTestFile ( const char *  path)

Definition at line 82 of file KTest.cpp.

References kTest_checkHeader().

Here is the call graph for this function:

◆ kTest_numBytes()

unsigned kTest_numBytes ( KTest bo)

Definition at line 222 of file KTest.cpp.

References KTestObject::numBytes, KTest::numObjects, and KTest::objects.

Referenced by main().

Here is the caller graph for this function:

◆ kTest_toFile()

int kTest_toFile ( KTest bo,
const char *  path 
)

Definition at line 178 of file KTest.cpp.

References KTest::args, KTestObject::bytes, KTEST_MAGIC, KTEST_VERSION, KTestObject::name, KTest::numArgs, KTestObject::numBytes, KTest::numObjects, KTest::objects, KTest::symArgvLen, KTest::symArgvs, write_string(), and write_uint32().

Referenced by main(), and KleeHandler::processTestCase().

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

◆ read_string()

static int read_string ( FILE *  f,
char **  value_out 
)
static

Definition at line 42 of file KTest.cpp.

References read_uint32().

Referenced by kTest_fromFile().

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

◆ read_uint32()

static int read_uint32 ( FILE *  f,
unsigned *  value_out 
)
static

Definition at line 25 of file KTest.cpp.

Referenced by kTest_fromFile(), and read_string().

Here is the caller graph for this function:

◆ write_string()

static int write_string ( FILE *  f,
const char *  value 
)
static

Definition at line 55 of file KTest.cpp.

References write_uint32().

Referenced by kTest_toFile().

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

◆ write_uint32()

static int write_uint32 ( FILE *  f,
unsigned  value 
)
static

Definition at line 33 of file KTest.cpp.

Referenced by kTest_toFile(), and write_string().

Here is the caller graph for this function: