Skip to content

Commit

Permalink
Update the second unit test to test mixed designated and non-designat…
Browse files Browse the repository at this point in the history
…ed initializers
  • Loading branch information
mstorsjo authored and rbultje committed Dec 19, 2012
1 parent 04046d6 commit eb79e74
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions unit2.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ enum PixelFormat {
PIX_FMT_RGB24,
PIX_FMT_RGBA,
PIX_FMT_DUMMY,
PIX_FMT_DUMMY2,
PIX_FMT_GRAY8,
PIX_FMT_NB,
};
Expand All @@ -37,12 +38,15 @@ static const struct PixFmtInfo pix_fmt_info[] = {
.pixel_type = PIXEL_PACKED,
.is_alpha = 1,
.depth = 32,
}, [PIX_FMT_RGB24] = {
},
{ 1 },
[PIX_FMT_RGB24] = {
.nb_channels = 3,
.color_type = COLOR_RGB,
.pixel_type = PIXEL_PACKED,
.depth = 24,
}, [PIX_FMT_YUVJ420P] = {
},
[PIX_FMT_YUVJ420P] = {
.nb_channels = 3,
.color_type = COLOR_YUV_JPEG,
.pixel_type = PIXEL_PLANAR,
Expand All @@ -55,13 +59,22 @@ static const struct PixFmtInfo pix_fmt_info[] = {
}, [PIX_FMT_GRAY8] = {
.nb_channels = 1,
.color_type = COLOR_GRAY,
42,
.depth = 8,
}, [PIX_FMT_YUYV422] = {
.nb_channels = 3,
.color_type = COLOR_YUV,
.pixel_type = PIXEL_PACKED,
.depth = 16,
},
{ 2 },
};

int mixed_array[] = {
[PIX_FMT_YUYV422] = 1,
2,
[PIX_FMT_RGBA] = 3,
4,
};

static const struct {
Expand All @@ -71,6 +84,8 @@ static const struct {
.b = { .d = 1, },
}, random_values3 = {
0, { .d = 1, },
}, random_values4 = {
.a = 1, { 2, 3 },
};

static const struct {
Expand Down

0 comments on commit eb79e74

Please sign in to comment.