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 2B0409BBCC9; Mon, 29 Jan 2024 14:02:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2B0409BBCC9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1706526147; bh=LcejTvBLzDHeH4V8dl6jodbqKDb6ZU33B9nXyM0HUZ4=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=noBRbeuuN6Qi8tWyvD23fabrlpzVi4A0tEbwsG/UvnIRx0bzdpyMImNCc0aRr2yBS 5rHXb7K/6mMil0VqS7LsNf1I55nGo9VfzBjreHgVaXBeah5l4z0YCGKINAN7YtNQ3t 8wRfA7nn+SRPW3aWP5RSjWk2x6tZGP4putDLQO7Q= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [95.163.41.73]) (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 405839DC60B for ; Mon, 29 Jan 2024 13:50:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 405839DC60B Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1rUPDV-0000000BQ6r-2VOH; Mon, 29 Jan 2024 13:50:18 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Mon, 29 Jan 2024 13:45:26 +0300 Message-ID: <468ff041c9e3144f534a5fa1a21420a1e27719c8.1706520765.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9A2BFDE4DD2630CDA5F99C8985E3DD4BF24CBCDD037658F52182A05F5380850404C228DA9ACA6FE2765123487E3DBAD6533594132A326AF8B07FD10C561BAC747DCA41764705814784634D9B51EFD7DC0 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7CFDA40FA2326E319EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063706922F90966A37BA8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84F8BAFDE811D8CE5BE1BF1E404F07B8EA79C75ED3D38EB82CC7F00164DA146DAFE8445B8C89999728AA50765F79006375FFD5C25497261569FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E97D2AE7161E217F117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF6804EF05EF4ADF2A3AA81AA40904B5D9CF19DD082D7633A0C84D3B47A649675F3AA81AA40904B5D98AA50765F7900637EF1F32DBCCB8E3DECD04E86FAF290E2DB606B96278B59C421DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C088D2E8BEBF93D4B068655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C1156E5889A6D309143847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A517FD627F9838BBA75002B1117B3ED696A9F0707C179704F4C638DF663A625AFA823CB91A9FED034534781492E4B8EEAD2609375A3A81E2DDC79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CF0909D4254184F2ED84A91C2D0813FB969E5905C71A41FD48B82447FBD137AEA92DC0EA915DEF7D0C8FB01E7B8BF01A69738D2ADBCF9E4E68B718120DE96C5CC5305FEB632D07628CC226CC413062362A913E6812662D5F2A5EAB5682573093F7837F15F2B5E4A70B33F2C28C22F508233FCF178C6DD14203 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmd9AG1X07oQfxBb+C5YMRQ== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A7698C3C5F1C18FA833533594132A326AF8B07FD10C561BAC747B7CBEF92542CD7C88B0A2698F12F5C9EC77752E0C033A69E86920BD37369036789A8C6A0E60D2BB63A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit 26/26] test: enable LuaJIT test 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 Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patch moves the test from the to directory, includes it in , and names subtests. Resolves of tarantool/tarantool#7834 Part of tarantool/tarantool#9398 --- .../{sysdep => lang}/catch_cpp.lua | 36 ++++++++++--------- test/LuaJIT-tests/lang/index | 1 + 2 files changed, 20 insertions(+), 17 deletions(-) rename test/LuaJIT-tests/{sysdep => lang}/catch_cpp.lua (75%) diff --git a/test/LuaJIT-tests/sysdep/catch_cpp.lua b/test/LuaJIT-tests/lang/catch_cpp.lua similarity index 75% rename from test/LuaJIT-tests/sysdep/catch_cpp.lua rename to test/LuaJIT-tests/lang/catch_cpp.lua index b2251009..6c52c78c 100644 --- a/test/LuaJIT-tests/sysdep/catch_cpp.lua +++ b/test/LuaJIT-tests/lang/catch_cpp.lua @@ -1,30 +1,30 @@ +local cp = require("libcpptest") -local cp = require("cpptest") +local unwind -do +do --- catch, no error local a, b = pcall(cp.catch, function() return "x" end) assert(a == true and b == "x") end -do +do --- pcall throw local a, b = pcall(function() cp.throw("foo") end) assert(a == false and b == "C++ exception") end -local unwind -do +do --- catch throw local a, b = pcall(cp.catch, function() cp.throw("foo") end) unwind = a assert((a == false and b == "C++ exception") or (a == true and b == "foo")) end -do +do --- alloc, no error local st = cp.alloc(function() return cp.isalloc() end) assert(st == true) assert(cp.isalloc() == false) end -do +do --- throw in alloc local a, b = pcall(cp.alloc, function() assert(cp.isalloc() == true) return "foo", cp.throw @@ -33,21 +33,23 @@ do assert(cp.isalloc() == false) end -if unwind then - local a, b = pcall(cp.alloc, function() - assert(cp.isalloc() == true) - return "foo", error - end) - assert(a == false and b == "foo") - assert(cp.isalloc() == false) +do --- error in alloc + if unwind then + local a, b = pcall(cp.alloc, function() + assert(cp.isalloc() == true) + return "foo", error + end) + assert(a == false and b == "foo") + assert(cp.isalloc() == false) + end end -do +do --- usereg nop local a,b,c,d,e,f = cp.usereg(100, 50, function() end, false) assert(a==164 and b==312 and c==428 and d==3696 and e==404 and f==404) end -do +do --- usereg error local function test() cp.usereg(100, 40, error, "foo") end @@ -55,7 +57,7 @@ do assert(a==164 and b==312 and c==428 and d==3696 and e==404 and f==404) end -do +do --- usereg trace with self table lookup local t = {}; t.t = t; local function foo() diff --git a/test/LuaJIT-tests/lang/index b/test/LuaJIT-tests/lang/index index 87b0c5a0..41f7e7db 100644 --- a/test/LuaJIT-tests/lang/index +++ b/test/LuaJIT-tests/lang/index @@ -1,6 +1,7 @@ andor.lua api_call.lua assignment.lua +catch_cpp.lua catch_wrap.lua compare.lua compare_nan.lua -- 2.43.0