Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
d377fe80
Commit
d377fe80
authored
Mar 02, 2012
by
Vicent Martí
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attr: Add missing header to test suite
parent
97da3eae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
tests-clar/attr/attr_expect.h
+42
-0
No files found.
tests-clar/attr/attr_expect.h
0 → 100644
View file @
d377fe80
#ifndef __CLAR_TEST_ATTR_EXPECT__
#define __CLAR_TEST_ATTR_EXPECT__
enum
attr_expect_t
{
EXPECT_FALSE
,
EXPECT_TRUE
,
EXPECT_UNDEFINED
,
EXPECT_STRING
};
struct
attr_expected
{
const
char
*
path
;
const
char
*
attr
;
enum
attr_expect_t
expected
;
const
char
*
expected_str
;
};
static
inline
void
attr_check_expected
(
enum
attr_expect_t
expected
,
const
char
*
expected_str
,
const
char
*
value
)
{
switch
(
expected
)
{
case
EXPECT_TRUE
:
cl_assert
(
GIT_ATTR_TRUE
(
value
));
break
;
case
EXPECT_FALSE
:
cl_assert
(
GIT_ATTR_FALSE
(
value
));
break
;
case
EXPECT_UNDEFINED
:
cl_assert
(
GIT_ATTR_UNSPECIFIED
(
value
));
break
;
case
EXPECT_STRING
:
cl_assert_strequal
(
expected_str
,
value
);
break
;
}
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment