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:
authorVicent Martí <vicent@github.com>2013-01-26 08:37:39 +0400
committerVicent Martí <vicent@github.com>2013-01-26 08:37:39 +0400
commit4adb4815bf4be623f765b593e3a3d50ab9710aab (patch)
treea50802fa1a16b1605880216e39add4cf46b0076a /tests-clar/config
parent28db9f216da1da7955118a80c6eacaf7bf5dfac9 (diff)
parenta7f8065f8cd3d635264b3bfdb93cd0c22bb960a4 (diff)
Merge pull request #1278 from sba1/cl-assert-equal-s
Use cl_assert_equal_s() instead of strcmp().
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 db354376a..8cc64d23c 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,7 +70,7 @@ 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);
}