aboutsummaryrefslogtreecommitdiff
path: root/tests/keeper.lua
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-03-28 11:09:02 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-03-28 11:09:02 +0100
commitdce4fbc640fc41241c77aaf31da51b8fcc0f11d9 (patch)
treea0bdf4412bc7556c0b1c24f1e5f401c1960eb8c4 /tests/keeper.lua
parentcaf556e2dcb3df4992dd386a2b37535df42fc880 (diff)
downloadlanes-dce4fbc640fc41241c77aaf31da51b8fcc0f11d9.tar.gz
lanes-dce4fbc640fc41241c77aaf31da51b8fcc0f11d9.tar.bz2
lanes-dce4fbc640fc41241c77aaf31da51b8fcc0f11d9.zip
C++ migration: less kludgy Linda name management with a std::variant
Diffstat (limited to '')
-rw-r--r--tests/keeper.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/keeper.lua b/tests/keeper.lua
index 11bbe17..9b38f02 100644
--- a/tests/keeper.lua
+++ b/tests/keeper.lua
@@ -6,6 +6,14 @@
6 6
7local lanes = require "lanes".configure{ with_timers = false, nb_keepers = 200} 7local lanes = require "lanes".configure{ with_timers = false, nb_keepers = 200}
8 8
9do
10 print "Linda names test:"
11 local unnamedLinda = lanes.linda()
12 local unnamedLinda2 = lanes.linda("")
13 local veeeerrrryyyylooongNamedLinda= lanes.linda( "veeeerrrryyyylooongNamedLinda", 1)
14 print(unnamedLinda, unnamedLinda2, veeeerrrryyyylooongNamedLinda)
15end
16
9local print_id = 0 17local print_id = 0
10local PRINT = function(...) 18local PRINT = function(...)
11 print_id = print_id + 1 19 print_id = print_id + 1
@@ -33,6 +41,7 @@ local B= keeper( lindaB )
33 41
34local lindaC= lanes.linda( "C", 3) 42local lindaC= lanes.linda( "C", 3)
35local C= keeper( lindaC ) 43local C= keeper( lindaC )
44print("Created", lindaA, lindaB, lindaC)
36 45
37A.some= 1 46A.some= 1
38PRINT("A.some == " .. A.some ) 47PRINT("A.some == " .. A.some )