On (07/12/15 15:51), Petr Cech wrote:
>Hi Lukas,
>
>thank you for review. I will send new version of tests, in one patch. And I
>will address your comments.
>
>However I would like to shed light on why I made the changes gradually. API
>consists of three functions. I wanted every patch adding just one feature of
>the API. First, I tested the function to open a database. Then I tested the
>entry into the database, which influenced the opening. Finally, I tested
>reading. I tried to build in the spirit of building a mathematical theory. It
>helped me to think about different cases. And I thought it would help to
>reviewer too...
>
>Well, I remake it in a single patch.
>
BTW there are also some coding style issues.
Your clang-format profil need some tuning :-)
but we discussed it in another thread


Here is a diff which you can inspire
-struct test_colondb_ctx
-{
only functions has "{" on next line
+struct test_colondb_ctx {
     bool is_file_created;
 };


 
@@ -110,9 +109,10 @@ static int _create_nonempty_file(const char *path, const 
char *name)
     TALLOC_CTX *tmp_ctx = NULL;
     struct sss_colondb *db = NULL;
     struct sss_colondb_write_field table[] = {
-        {SSS_COLONDB_STRING, {.str = TEST_STRING2}},
-        {SSS_COLONDB_UINT32, {.uint32 = TEST_INT2}},
-        {SSS_COLONDB_SENTINEL, {0}}};
          ^                         ^^
         missing spaces            last bracket should be on separate line
                                   for struct
+        { SSS_COLONDB_STRING, {.str = TEST_STRING2 } },
+        { SSS_COLONDB_UINT32, {.uint32 = TEST_INT2 } },
+        { SSS_COLONDB_SENTINEL, { 0 } }
+    };

    db =
        sss_colondb_open(test_ctx, SSS_COLONDB_READ, TESTS_PATH "/" TESTS_FILE);
   ^^^^^^
   We usualy put function arguments to following line for 80+ columns on line

BTW I'm looking forward to updated clang-format profile.

LS
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org

Reply via email to