Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Bauer <mail@sebastianbauer.info>2013-01-25 09:48:55 +0400
committerSebastian Bauer <mail@sebastianbauer.info>2013-01-25 09:55:56 +0400
commita7f8065f8cd3d635264b3bfdb93cd0c22bb960a4 (patch)
tree9b1b94a44b99e918b0063285c640115b4fdc4659 /tests-clar/config
parentc9e9640356f4c56fdb86d3313a5a7dcf282b7391 (diff)
Use cl_assert_equal_s() instead of strcmp().
Replaced all cl_assert(!strcmp()) or semantically equivalent forms by cl_assert_equal_s().
Diffstat (limited to 'tests-clar/config')
-rw-r--r--tests-clar/config/read.c2
-rw-r--r--tests-clar/config/stress.c8
-rw-r--r--tests-clar/config/write.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/tests-clar/config/read.c b/tests-clar/config/read.c
index 9c02307ad..c85826886 100644
--- a/tests-clar/config/read.c
+++ b/tests-clar/config/read.c
@@ -194,7 +194,7 @@ void test_config_read__escaping_quotes(void)
cl_git_pass(git_config_open_ondisk(&cfg, cl_fixture("config/config13")));
cl_git_pass(git_config_get_string(&str, cfg, "core.editor"));
- cl_assert(strcmp(str, "\"C:/Program Files/Nonsense/bah.exe\" \"--some option\"") == 0);
+ cl_assert_equal_s("\"C:/Program Files/Nonsense/bah.exe\" \"--some option\"", str);
git_config_free(cfg);
}
diff --git a/tests-clar/config/stress.c b/tests-clar/config/stress.c
index 317e877f7..2dfa730a0 100644
--- a/tests-clar/config/stress.c
+++ b/tests-clar/config/stress.c
@@ -45,13 +45,13 @@ void test_config_stress__comments(void)
cl_git_pass(git_config_open_ondisk(&config, cl_fixture("config/config12")));
cl_git_pass(git_config_get_string(&str, config, "some.section.other"));
- cl_assert(!strcmp(str, "hello! \" ; ; ; "));
+ cl_assert_equal_s("hello! \" ; ; ; ", str);
cl_git_pass(git_config_get_string(&str, config, "some.section.multi"));
- cl_assert(!strcmp(str, "hi, this is a ; multiline comment # with ;\n special chars and other stuff !@#"));
+ cl_assert_equal_s("hi, this is a ; multiline comment # with ;\n special chars and other stuff !@#", str);
cl_git_pass(git_config_get_string(&str, config, "some.section.back"));
- cl_assert(!strcmp(str, "this is \ba phrase"));
+ cl_assert_equal_s("this is \ba phrase", str);
git_config_free(config);
}
@@ -70,6 +70,6 @@ void test_config_stress__escape_subsection_names(void)
cl_git_pass(git_config_open_ondisk(&config, TEST_CONFIG));
cl_git_pass(git_config_get_string(&str, config, "some.sec\\tion.other"));
- cl_assert(!strcmp("foo", str));
+ cl_assert_equal_s("foo", str);
git_config_free(config);
}
diff --git a/tests-clar/config/write.c b/tests-clar/config/write.c
index 411d40a02..1b665cd19 100644
--- a/tests-clar/config/write.c
+++ b/tests-clar/config/write.c
@@ -116,7 +116,7 @@ void test_config_write__write_subsection(void)
cl_git_pass(git_config_open_ondisk(&cfg, "config9"));
cl_git_pass(git_config_get_string(&str, cfg, "my.own.var"));
- cl_git_pass(strcmp(str, "works"));
+ cl_assert_equal_s("works", str);
git_config_free(cfg);
}