From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 2EAD457AFE0; Fri, 18 Aug 2023 14:12:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2EAD457AFE0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692357141; bh=dgW9RXsyCAd+5KhQ88Py/Pk/1lbNGBBgSFuUjulrf3M=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=wj5Qvom0bkTKcNONUyvoEWkBPEdmZ+L47QpFGI9cBGNRPOOzvWxIGE6kBi3KpdfSz n2VrfvYHlQgJwsODKUV8EEcOuTgD+1zKjAsFkDahtqr0xWtr59b7uc4MKKSDfw1Utc USgbYBKEr/R4ycXWuQ9vPSq6fPAGQj9oOlwsBl6U= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [95.163.41.96]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 5EDE757AFE0 for ; Fri, 18 Aug 2023 14:12:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5EDE757AFE0 Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1qWxOr-009z0w-1H; Fri, 18 Aug 2023 14:12:18 +0300 Message-ID: <1b754f01-34f8-d1a5-504a-fa825f555065@tarantool.org> Date: Fri, 18 Aug 2023 14:12:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Sergey Kaplun , Igor Munkin References: <28c7aec4df761b06208cc7ccd9055dd444ed2a70.1692089299.git.skaplun@tarantool.org> <29d67ed7-fed4-28ed-8dde-8030189008d6@tarantool.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD93C8852532D76B9E34D2ACEC335C169B0473DBEF2DE65072A182A05F53808504060F9683A5BAB2B6F70203402672B46A02C9369DCEA3EA7DBB233F10E69C14CAB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A3295C83650092F9EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375448D590B04CE87D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8B7048D6DB87391664625FAB679696C7E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC20302DFC78685446A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA73AA81AA40904B5D9A18204E546F3947C1F9513A7CA91E5556E0066C2D8992A164AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C326163BE27A4E3063BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF17B107DEF921CE791DD303D21008E298D5E8D9A59859A8B6D6FBC3EC642A93BB75ECD9A6C639B01B78DA827A17800CE75B51C8FB0C3E748C731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A5FF0223938C193052BD8A6B2E03D6148F545E0F8763B059BCF87CCE6106E1FC07E67D4AC08A07B9B01DAA61796BF5227BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34A5970F8A4685C8AB0BD93F34D520D983B052162FF37CC95FCEC8ACE225A4E96F76158DDE2FF229F51D7E09C32AA3244C71343C09AF7CF7F1F5EB6239224753A33A92A9747B6CC886BAD658CF5C8AB4025DA084F8E80FEBD3FFA33E6B6B2F82C47A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojgZIFrgxvv3rxQFlNhOTq9g== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F25884589EA4920688B4621D31589B7309F3C74A341E225579608306282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30B0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/5] test: introduce `samevalues()` TAP checker X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, On 8/18/23 13:58, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the review! > Please, consider my comments below. > > On 18.08.23, Sergey Bronnikov wrote: >> Hi, Sergey >> >> >> Thanks for the patch! See my comments inline. >> >> >> On 8/15/23 12:36, Sergey Kaplun wrote: >>> The introduced `samevalues()` helper checks that values in range from >>> 1, to `table.maxn()` of the given table are exactly the same. It may be >>> usefull for test consistency of JIT and VM behaviour. Originally, the >>> `arr_is_consistent()` function was introduced in the >>> . `samevalues()` has the same >>> functionallity (except usage of `table.maxn()` instead `#` operator to >>> be sure, that the table we check isn't a sparse array). >> I would rename samevalues to something like assert_equals or >> assert_items_equals just because >> >> similar functions are named in unit testing frameworks and helpers with >> prefix assert_ > As you can see we use naming without _ for exported function in the > module, so additional one with strange naming will be > inconsistent. > > Also, discussed this naming with Igor and Max offline and this name is > OK for them, feel free also to CC Igor to discuss:). > >> more readable from my point of view. See names for assertions in luatest >> [1] and JUnit (popular unit testing framework). >> >> >> 1. https://github.com/tarantool/luatest#list-of-luatest-functions >> >> 2. >> https://junit.org/junit5/docs/5.0.1/api/org/junit/jupiter/api/Assertions.html >> >> Igor, what do you think regarding naming of the introduced function?