aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/unit1304.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-04-03 16:21:10 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-04-03 22:38:36 +0200
commita981141b199702ffd780a4390e601db565102c65 (patch)
treec92b2a21887fb1f9683372c2564584d1ee79fea7 /tests/unit/unit1304.c
parentd3252e000c96f31456667c3033c13d83e2628d29 (diff)
unit: make unit test source code checksrc compliant
Diffstat (limited to 'tests/unit/unit1304.c')
-rw-r--r--tests/unit/unit1304.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c
index 8c306e44e..11bba390f 100644
--- a/tests/unit/unit1304.c
+++ b/tests/unit/unit1304.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -31,10 +31,10 @@ static CURLcode unit_setup(void)
{
password = strdup("");
login = strdup("");
- if (!password || !login) {
- Curl_safefree(password);
- Curl_safefree(login);
- return CURLE_OUT_OF_MEMORY;
+ if(!password || !login) {
+ Curl_safefree(password);
+ Curl_safefree(login);
+ return CURLE_OUT_OF_MEMORY;
}
return CURLE_OK;
}
@@ -72,7 +72,8 @@ UNITTEST_START
abort_unless(password != NULL, "returned NULL!");
fail_unless(password[0] == 0, "password should not have been changed");
abort_unless(login != NULL, "returned NULL!");
- fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed");
+ fail_unless(strncmp(login, "me", 2) == 0,
+ "login should not have been changed");
/*
* Test a non existent login and host in our netrc file.
@@ -85,7 +86,8 @@ UNITTEST_START
abort_unless(password != NULL, "returned NULL!");
fail_unless(password[0] == 0, "password should not have been changed");
abort_unless(login != NULL, "returned NULL!");
- fail_unless(strncmp(login, "me", 2) == 0, "login should not have been changed");
+ fail_unless(strncmp(login, "me", 2) == 0,
+ "login should not have been changed");
/*
* Test a non existent login (substring of an existing one) in our
@@ -99,7 +101,8 @@ UNITTEST_START
abort_unless(password != NULL, "returned NULL!");
fail_unless(password[0] == 0, "password should not have been changed");
abort_unless(login != NULL, "returned NULL!");
- fail_unless(strncmp(login, "admi", 4) == 0, "login should not have been changed");
+ fail_unless(strncmp(login, "admi", 4) == 0,
+ "login should not have been changed");
/*
* Test a non existent login (superstring of an existing one)
@@ -113,7 +116,8 @@ UNITTEST_START
abort_unless(password != NULL, "returned NULL!");
fail_unless(password[0] == 0, "password should not have been changed");
abort_unless(login != NULL, "returned NULL!");
- fail_unless(strncmp(login, "adminn", 6) == 0, "login should not have been changed");
+ fail_unless(strncmp(login, "adminn", 6) == 0,
+ "login should not have been changed");
/*
* Test for the first existing host in our netrc file