Skip to content

Commit 1e758fd

Browse files
committed
just use git_message_trailer in tests
1 parent 6062032 commit 1e758fd

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

tests/message/trailer.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#include "clar_libgit2.h"
22
#include "message.h"
33

4-
struct trailer {
5-
const char *key;
6-
const char *value;
7-
};
8-
9-
static void assert_trailers(const char *message, struct trailer *trailers)
4+
static void assert_trailers(const char *message, git_message_trailer *trailers)
105
{
116
git_message_trailer_array arr;
127
size_t i;
@@ -27,7 +22,7 @@ static void assert_trailers(const char *message, struct trailer *trailers)
2722

2823
void test_message_trailer__simple(void)
2924
{
30-
struct trailer trailers[] = {
25+
git_message_trailer trailers[] = {
3126
{"Signed-off-by", "foo@bar.com"},
3227
{"Signed-off-by", "someone@else.com"},
3328
{NULL, NULL},
@@ -43,7 +38,7 @@ void test_message_trailer__simple(void)
4338

4439
void test_message_trailer__no_whitespace(void)
4540
{
46-
struct trailer trailers[] = {
41+
git_message_trailer trailers[] = {
4742
{"Key", "value"},
4843
{NULL, NULL},
4944
};
@@ -57,7 +52,7 @@ void test_message_trailer__no_whitespace(void)
5752

5853
void test_message_trailer__extra_whitespace(void)
5954
{
60-
struct trailer trailers[] = {
55+
git_message_trailer trailers[] = {
6156
{"Key", "value"},
6257
{NULL, NULL},
6358
};
@@ -71,7 +66,7 @@ void test_message_trailer__extra_whitespace(void)
7166

7267
void test_message_trailer__no_newline(void)
7368
{
74-
struct trailer trailers[] = {
69+
git_message_trailer trailers[] = {
7570
{"Key", "value"},
7671
{NULL, NULL},
7772
};
@@ -85,7 +80,7 @@ void test_message_trailer__no_newline(void)
8580

8681
void test_message_trailer__not_last_paragraph(void)
8782
{
88-
struct trailer trailers[] = {
83+
git_message_trailer trailers[] = {
8984
{NULL, NULL},
9085
};
9186

@@ -100,7 +95,7 @@ void test_message_trailer__not_last_paragraph(void)
10095

10196
void test_message_trailer__conflicts(void)
10297
{
103-
struct trailer trailers[] = {
98+
git_message_trailer trailers[] = {
10499
{"Key", "value"},
105100
{NULL, NULL},
106101
};
@@ -117,7 +112,7 @@ void test_message_trailer__conflicts(void)
117112

118113
void test_message_trailer__patch(void)
119114
{
120-
struct trailer trailers[] = {
115+
git_message_trailer trailers[] = {
121116
{"Key", "value"},
122117
{NULL, NULL},
123118
};
@@ -134,7 +129,7 @@ void test_message_trailer__patch(void)
134129

135130
void test_message_trailer__continuation(void)
136131
{
137-
struct trailer trailers[] = {
132+
git_message_trailer trailers[] = {
138133
{"A", "b\n c"},
139134
{"D", "e\n f: g h"},
140135
{"I", "j"},
@@ -154,7 +149,7 @@ void test_message_trailer__continuation(void)
154149

155150
void test_message_trailer__invalid(void)
156151
{
157-
struct trailer trailers[] = {
152+
git_message_trailer trailers[] = {
158153
{"Signed-off-by", "some@one.com"},
159154
{"Another", "trailer"},
160155
{NULL, NULL},

0 commit comments

Comments
 (0)