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 9D51C74D940; Fri, 19 Jan 2024 14:49:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9D51C74D940 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1705664974; bh=fvZh7QKiyh1NQQHBWteJS2PoYYQXBexKjUmFoSBeFaE=; 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=xnF6pY7Tno5gaCpPRJnv52pTWjCnExCEDhS1xwHJDyOVLxf2kOafWNKbXmLYC5cAh QasNoIG6NdW4f31O8atMFA7R/5VqAV9GG7M70cwfZuw4YoKIgHhi6H9M6l8MveItvR rvhCJ14RDBPgjAVJORaww4uZD3Jn4EKcb1Ji5Le8= Received: from smtp16.i.mail.ru (smtp16.i.mail.ru [95.163.41.69]) (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 0035B74D940 for ; Fri, 19 Jan 2024 14:37:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0035B74D940 Received: by smtp16.i.mail.ru with esmtpa (envelope-from ) id 1rQnBz-00FDC7-1P; Fri, 19 Jan 2024 14:37:47 +0300 To: Maxim Kokryashkin , Sergey Bronnikov Date: Fri, 19 Jan 2024 14:32:48 +0300 Message-ID: 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: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD9AE5B4AFB3AE2A590AC49F3668DF3AF4BBF6B994171853288182A05F538085040BEAD0090973A61D577CA480E2D39EF6F3483E5AB8329760D865BA9B5E7A8EBB6 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE796AA83661EF29BCEEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374ECA27954A00B6C3EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38B73AB1701401CD871BD6D49146BD022EA8E3879C43EBE93F2CC7F00164DA146DAFE8445B8C89999728AA50765F790063793270F7220657A0A389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC821E93C0F2A571C7BF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE33AC447995A7AD187441229DB5CFFAA63A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7351D6A3D1828C12CDEC4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A501C22EDD0F3F7C723DE3FD803DF40A2FD0C3FCDD67FD83D9F87CCE6106E1FC07E67D4AC08A07B9B0BFD98ABA943BD70B9C5DF10A05D560A950611B66E3DA6D700B0A020F03D25A0997E3FB2386030E77 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFDBF14EF9DA93E868E14730C611B3E6C0CBF39A56D80E6AD814027563B6058701F2D331BABA2AF9056197189FEE4B1C7A205AE3CB0D15510F99EDACE432C5B66AA74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojJsr4kcGAUCMMJJndh7DKhg== X-DA7885C5: E6AC5D9AE893CCDB22358C9D20223E7B0C9C54853CC29358FD08F6289271F76E262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F7393590D8C940224AE33B8718B3EB3C13F36D9513C87C070D43D0FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH luajit 25/25] 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 (77%) diff --git a/test/LuaJIT-tests/sysdep/catch_cpp.lua b/test/LuaJIT-tests/lang/catch_cpp.lua similarity index 77% rename from test/LuaJIT-tests/sysdep/catch_cpp.lua rename to test/LuaJIT-tests/lang/catch_cpp.lua index b2251009..798b926a 100644 --- a/test/LuaJIT-tests/sysdep/catch_cpp.lua +++ b/test/LuaJIT-tests/lang/catch_cpp.lua @@ -1,30 +1,30 @@ - local cp = require("cpptest") -do +local unwind + +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