Hash :
9994cd3f
Author :
Date :
2018-06-25T11:56:52
treewide: remove use of C++ style comments C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#include "clar_libgit2.h"
#include "worktree_helpers.h"
#define COMMON_REPO "testrepo"
#define WORKTREE_REPO "testrepo-worktree"
static worktree_fixture fixture =
WORKTREE_FIXTURE_INIT(COMMON_REPO, WORKTREE_REPO);
void test_worktree_config__initialize(void)
{
setup_fixture_worktree(&fixture);
}
void test_worktree_config__cleanup(void)
{
cleanup_fixture_worktree(&fixture);
}
void test_worktree_config__open(void)
{
git_config *cfg;
cl_git_pass(git_repository_config(&cfg, fixture.worktree));
cl_assert(cfg != NULL);
git_config_free(cfg);
}
void test_worktree_config__set(void)
{
git_config *cfg;
int32_t val;
cl_git_pass(git_repository_config(&cfg, fixture.worktree));
cl_git_pass(git_config_set_int32(cfg, "core.dummy", 5));
git_config_free(cfg);
/*
* reopen to verify configuration has been set in the
* common dir
*/
cl_git_pass(git_repository_config(&cfg, fixture.repo));
cl_git_pass(git_config_get_int32(&val, cfg, "core.dummy"));
cl_assert_equal_i(val, 5);
git_config_free(cfg);
}