From: Vladimir Davydov <vdavydov.dev@gmail.com> To: Kirill Shcherbatov <kshcherbatov@tarantool.org> Cc: tarantool-patches@freelists.org Subject: Re: [tarantool-patches] Re: [PATCH v1 3/4] box: introduce bitmap_majority_test routine Date: Sat, 29 Dec 2018 19:16:59 +0300 [thread overview] Message-ID: <20181229161659.7iuzitab2zq2bomw@esperanza> (raw) In-Reply-To: <25613688-02dd-7fa8-c200-1b3a9be20972@tarantool.org> On Sat, Dec 29, 2018 at 04:57:00PM +0300, Kirill Shcherbatov wrote: > +/** > + * Return sizeof(unsigned long)-words aligned size of bitmap by > + * bit_count - count of bits to set. Size must be aligned, as > + * bit_sit/bit_clear operations use unsigned long words to setup > + * bit. > + */ Changed the comment to /** * @brief Returns the size of memory needed to store a bitmap * of \a bit_count bits. * The function rounds the size up to a multiple of the word * size, which is required by bit_set() and bit_clear(). * @param bit_count number of bits in the bitmap * @retval bitmap size, in bytes */ (used doxygen, because all other comments in the file are formated in the same way) > +1..5 > +ok 1 - empty bitmap: have 0 expected 0 > +ok 2 - 1-item bitmap: have 8 expected 8 > +ok 3 - 4-items bitmap: have 8 expected 8 > +ok 4 - 64-items bitmap: have 8 expected 8 > +ok 5 - 65-items bitmap: have 16 expected 16 > + *** test_bitmap: done *** OK, now I see why you used fail_unless in the previous version - because all other tests in the file use it. Then you should've told me that instead of blindly following my instructions - I can make mistakes too. Changed the test back to fail_unless for consistency and pushed the patch to 2.1.
next prev parent reply other threads:[~2018-12-29 16:16 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-27 11:15 [PATCH v1 0/4] box: JSON preparatory patchset Kirill Shcherbatov 2018-12-27 11:15 ` [PATCH v1 1/4] lib: introduce json_tree_snprint_path Kirill Shcherbatov 2018-12-27 18:51 ` Vladimir Davydov 2018-12-27 11:15 ` [PATCH v1 2/4] lib: introduce json_token_is_leaf helper Kirill Shcherbatov 2018-12-27 18:52 ` Vladimir Davydov 2018-12-27 11:15 ` [PATCH v1 3/4] box: introduce bitmap_majority_test routine Kirill Shcherbatov 2018-12-27 18:59 ` Vladimir Davydov 2018-12-29 12:58 ` [tarantool-patches] " Kirill Shcherbatov 2018-12-29 13:19 ` Vladimir Davydov 2018-12-29 13:57 ` Kirill Shcherbatov 2018-12-29 16:16 ` Vladimir Davydov [this message] 2018-12-27 11:15 ` [PATCH v1 4/4] box: refactor tuple_init_field_map to use bitmap Kirill Shcherbatov 2018-12-27 11:48 ` [tarantool-patches] " Konstantin Osipov 2018-12-27 19:12 ` Vladimir Davydov 2018-12-29 12:58 ` [tarantool-patches] " Kirill Shcherbatov 2018-12-29 13:22 ` Vladimir Davydov 2018-12-29 16:25 ` Vladimir Davydov 2018-12-27 19:13 ` [PATCH v1 0/4] box: JSON preparatory patchset Vladimir Davydov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181229161659.7iuzitab2zq2bomw@esperanza \ --to=vdavydov.dev@gmail.com \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] Re: [PATCH v1 3/4] box: introduce bitmap_majority_test routine' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox