klee
KTest.h
Go to the documentation of this file.
1//===-- KTest.h --------------------------------------------------*- C++ -*-===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef KLEE_KTEST_H
11#define KLEE_KTEST_H
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17 typedef struct KTestObject KTestObject;
18 struct KTestObject {
19 char *name;
20 unsigned numBytes;
21 unsigned char *bytes;
22 };
23
24 typedef struct KTest KTest;
25 struct KTest {
26 /* file format version */
27 unsigned version;
28
29 unsigned numArgs;
30 char **args;
31
32 unsigned symArgvs;
33 unsigned symArgvLen;
34
35 unsigned numObjects;
37 };
38
39
40 /* returns the current .ktest file format version */
41 unsigned kTest_getCurrentVersion();
42
43 /* return true iff file at path matches KTest header */
44 int kTest_isKTestFile(const char *path);
45
46 /* returns NULL on (unspecified) error */
47 KTest* kTest_fromFile(const char *path);
48
49 /* returns 1 on success, 0 on (unspecified) error */
50 int kTest_toFile(KTest *, const char *path);
51
52 /* returns total number of object bytes */
53 unsigned kTest_numBytes(KTest *);
54
55 void kTest_free(KTest *);
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif /* KLEE_KTEST_H */
void kTest_free(KTest *)
Definition: KTest.cpp:229
KTest * kTest_fromFile(const char *path)
Definition: KTest.cpp:94
unsigned kTest_numBytes(KTest *)
Definition: KTest.cpp:222
int kTest_toFile(KTest *, const char *path)
Definition: KTest.cpp:178
int kTest_isKTestFile(const char *path)
Definition: KTest.cpp:82
unsigned kTest_getCurrentVersion()
Definition: KTest.cpp:67
char * name
Definition: KTest.h:19
unsigned char * bytes
Definition: KTest.h:21
unsigned numBytes
Definition: KTest.h:20
Definition: KTest.h:25
unsigned symArgvLen
Definition: KTest.h:33
unsigned version
Definition: KTest.h:27
unsigned numObjects
Definition: KTest.h:35
KTestObject * objects
Definition: KTest.h:36
unsigned numArgs
Definition: KTest.h:29
unsigned symArgvs
Definition: KTest.h:32
char ** args
Definition: KTest.h:30