iPXE
Main Page
Related Pages
Modules
+
Data Structures
Data Structures
Data Structure Index
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
b
d
i
p
s
t
u
v
x
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Enumerations
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
tests
pixbuf_test.h
Go to the documentation of this file.
1
#ifndef _PIXBUF_TEST_H
2
#define _PIXBUF_TEST_H
3
4
FILE_LICENCE
( GPL2_OR_LATER_OR_UBDL );
5
6
#include <
stdint.h
>
7
#include <
ipxe/refcnt.h
>
8
#include <
ipxe/image.h
>
9
#include <
ipxe/test.h
>
10
11
/** A pixel buffer test */
12
struct
pixel_buffer_test
{
13
/** Image type */
14
struct
image_type
*
type
;
15
/** Source image */
16
struct
image
*
image
;
17
/** Pixel data */
18
const
uint32_t
*
data
;
19
/** Length of pixel data */
20
size_t
len
;
21
/** Width */
22
unsigned
int
width
;
23
/** Height */
24
unsigned
int
height
;
25
};
26
27
/**
28
* Define a pixel buffer test
29
*
30
* @v _name Test name
31
* @v _type Test image file type
32
* @v _file Test image file data
33
* @v _width Expected pixel buffer width
34
* @v _height Expected pixel buffer height
35
* @v _data Expected pixel buffer data
36
* @ret test Pixel buffer test
37
*/
38
#define PIX( _name, _type, _file, _width, _height, _data ) \
39
static const char _name ## __file[] = _file; \
40
static const uint32_t _name ## __data[] = _data; \
41
static struct image _name ## __image = { \
42
.refcnt = REF_INIT ( ref_no_free ), \
43
.name = #_name, \
44
.data = ( userptr_t ) ( _name ## __file ), \
45
.len = sizeof ( _name ## __file ), \
46
}; \
47
static struct pixel_buffer_test _name = { \
48
.type = _type, \
49
.image = & _name ## __image, \
50
.data = _name ## __data, \
51
.len = sizeof ( _name ## __data ), \
52
.width = _width, \
53
.height = _height, \
54
};
55
56
extern
void
pixbuf_okx
(
struct
pixel_buffer_test
*
test
,
const
char
*file,
57
unsigned
int
line );
58
59
/**
60
* Report pixel buffer test result
61
*
62
* @v test Pixel buffer test
63
*/
64
#define pixbuf_ok( test ) pixbuf_okx ( test, __FILE__, __LINE__ )
65
66
#endif
/* _PIXBUF_TEST_H */
pixel_buffer_test::data
const uint32_t * data
Pixel data.
Definition:
pixbuf_test.h:18
pixel_buffer_test::image
struct image * image
Source image.
Definition:
pixbuf_test.h:16
FILE_LICENCE
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
image_type
An executable image type.
Definition:
image.h:76
test.h
Self-test infrastructure.
image
An executable image.
Definition:
image.h:24
image.h
Executable images.
pixel_buffer_test::type
struct image_type * type
Image type.
Definition:
pixbuf_test.h:14
pixel_buffer_test::len
size_t len
Length of pixel data.
Definition:
pixbuf_test.h:20
pixel_buffer_test::height
unsigned int height
Height.
Definition:
pixbuf_test.h:24
uint32_t
unsigned int uint32_t
Definition:
stdint.h:12
refcnt.h
Reference counting.
stdint.h
pixbuf_okx
void pixbuf_okx(struct pixel_buffer_test *test, const char *file, unsigned int line)
Report pixel buffer test result.
Definition:
pixbuf_test.c:48
pixel_buffer_test
A pixel buffer test.
Definition:
pixbuf_test.h:12
pixel_buffer_test::width
unsigned int width
Width.
Definition:
pixbuf_test.h:22
test
static int test
Definition:
epic100.c:73
Generated by
1.8.15