aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 17:11:36 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 17:11:36 +0200
commit50f4c40bdb5667aa7053434dede2dd98f6f9e243 (patch)
treec443c9337e238ff2825b2da4c9749fdf97aa574f /tests
parentec8574d298ef302bc4162d9b394e96bf08763632 (diff)
downloadlanes-50f4c40bdb5667aa7053434dede2dd98f6f9e243.tar.gz
lanes-50f4c40bdb5667aa7053434dede2dd98f6f9e243.tar.bz2
lanes-50f4c40bdb5667aa7053434dede2dd98f6f9e243.zip
Wording fix: parameter → argument
Diffstat (limited to 'tests')
-rw-r--r--tests/argtable.lua8
-rw-r--r--tests/assert.lua6
-rw-r--r--tests/cyclic.lua4
-rw-r--r--tests/finalizer.lua2
-rw-r--r--tests/objects.lua2
5 files changed, 11 insertions, 11 deletions
diff --git a/tests/argtable.lua b/tests/argtable.lua
index 5ed5d4e..95ee825 100644
--- a/tests/argtable.lua
+++ b/tests/argtable.lua
@@ -1,7 +1,7 @@
1-- 1--
2-- ARGTABLE.LUA Copyright (c) 2007, Asko Kauppi <akauppi@gmail.com> 2-- ARGTABLE.LUA Copyright (c) 2007, Asko Kauppi <akauppi@gmail.com>
3-- 3--
4-- Command line parameter parsing 4-- Command line argument parsing
5-- 5--
6-- NOTE: Wouldn't hurt having such a service built-in to Lua...? :P 6-- NOTE: Wouldn't hurt having such a service built-in to Lua...? :P
7-- 7--
@@ -10,10 +10,10 @@ local m= {}
10 10
11-- tbl= argtable(...) 11-- tbl= argtable(...)
12-- 12--
13-- Returns a table with 1..N indices being 'value' parameters, and any 13-- Returns a table with 1..N indices being 'value' arguments, and any
14-- "-flag[=xxx]" or "--flag[=xxx]" parameters set to { flag=xxx/true }. 14-- "-flag[=xxx]" or "--flag[=xxx]" arguments set to { flag=xxx/true }.
15-- 15--
16-- In other words, makes handling command line parameters simple. :) 16-- In other words, makes handling command line arguments simple. :)
17-- 17--
18-- 15 --> { 15 } 18-- 15 --> { 15 }
19-- -20 --> { -20 } 19-- -20 --> { -20 }
diff --git a/tests/assert.lua b/tests/assert.lua
index 85febfb..7bb4233 100644
--- a/tests/assert.lua
+++ b/tests/assert.lua
@@ -6,7 +6,7 @@
6-- 6--
7-- This module allows shorthand use s.a. 'assert.table()' for asserting 7-- This module allows shorthand use s.a. 'assert.table()' for asserting
8-- variable types, and is also being used by Lua-super constraints system 8-- variable types, and is also being used by Lua-super constraints system
9-- for testing function parameter & return types. 9-- for testing function argument & return types.
10-- 10--
11-- All in all, a worthy module and could be part of Lua future versions. 11-- All in all, a worthy module and could be part of Lua future versions.
12-- 12--
@@ -182,7 +182,7 @@ assert=
182 return v 182 return v
183 end, 183 end,
184 184
185 -- Range assertion, with extra parameters per instance 185 -- Range assertion, with extra arguments per instance
186 -- 186 --
187 -- Note: values may be of _any_ type that can do >=, <= comparisons. 187 -- Note: values may be of _any_ type that can do >=, <= comparisons.
188 -- 188 --
@@ -240,7 +240,7 @@ assert=
240 end 240 end
241 end 241 end
242 242
243 _assert( type(tbl)=="table", "Wrong parameter to assert['{}']" ) 243 _assert( type(tbl)=="table", "Wrong argument to assert['{}']" )
244 244
245 return function( v, msg, lev ) 245 return function( v, msg, lev )
246 lev= (lev or 1)+1 246 lev= (lev or 1)+1
diff --git a/tests/cyclic.lua b/tests/cyclic.lua
index fd6d4a0..ed4bdba 100644
--- a/tests/cyclic.lua
+++ b/tests/cyclic.lua
@@ -34,10 +34,10 @@ end
34local L1= lanes.gen( "io", lane1 )() 34local L1= lanes.gen( "io", lane1 )()
35 -- ...running 35 -- ...running
36 36
37-- Getting the tables as parameters should also keep the linkage 37-- Getting the tables as arguments should also keep the linkage
38-- 38--
39local function lane2( aa, bb ) 39local function lane2( aa, bb )
40 WR( "Via parameters:", same(aa,bb[1]), same(aa[1],bb) ) 40 WR( "Via arguments:", same(aa,bb[1]), same(aa[1],bb) )
41 assert( aa[1]==bb ) 41 assert( aa[1]==bb )
42 assert( bb[1]==aa ) 42 assert( bb[1]==aa )
43 return true 43 return true
diff --git a/tests/finalizer.lua b/tests/finalizer.lua
index 3158c65..1412a67 100644
--- a/tests/finalizer.lua
+++ b/tests/finalizer.lua
@@ -44,7 +44,7 @@ end
44 44
45-- 45--
46-- This is called at the end of the lane; whether succesful or not. 46-- This is called at the end of the lane; whether succesful or not.
47-- Gets the 'error()' parameter as parameter ('nil' if normal return). 47-- Gets the 'error()' argument as argument ('nil' if normal return).
48-- 48--
49cleanup = function(err) 49cleanup = function(err)
50 io.stderr:write "------------------------ In Worker Finalizer -----------------------\n" 50 io.stderr:write "------------------------ In Worker Finalizer -----------------------\n"
diff --git a/tests/objects.lua b/tests/objects.lua
index 61c280d..ed460af 100644
--- a/tests/objects.lua
+++ b/tests/objects.lua
@@ -68,7 +68,7 @@ local mt_a= getmetatable(a)
68local mt_b= getmetatable(b) 68local mt_b= getmetatable(b)
69assert(mt_a and mt_a==mt_b ) 69assert(mt_a and mt_a==mt_b )
70 70
71local h= start_lane(a) -- 1st object as parameter 71local h= start_lane(a) -- 1st object as argument
72 72
73linda:send("", b ) -- 2nd object via Linda 73linda:send("", b ) -- 2nd object via Linda
74 74