diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fifo.lua | 2 | ||||
-rw-r--r-- | tests/keeper.lua | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/fifo.lua b/tests/fifo.lua index 3d6e140..498f540 100644 --- a/tests/fifo.lua +++ b/tests/fifo.lua | |||
@@ -52,7 +52,7 @@ for key,count in pairs(fifo_linda:count(A.channel, B.channel)) do | |||
52 | print("channel " .. key .. " contains " .. count .. " entries.") | 52 | print("channel " .. key .. " contains " .. count .. " entries.") |
53 | -- print(i, key_count[1], key_count[2]) | 53 | -- print(i, key_count[1], key_count[2]) |
54 | end | 54 | end |
55 | print "Dumping linda stats.. [3]" -- count everything | 55 | print "Dumping linda stats.. [4]" -- count everything |
56 | for key,contents in pairs(fifo_linda:dump()) do | 56 | for key,contents in pairs(fifo_linda:dump()) do |
57 | print("channel " .. key .. ": limit=".. contents.limit, " first=" .. contents.first, " count=" .. contents.count) | 57 | print("channel " .. key .. ": limit=".. contents.limit, " first=" .. contents.first, " count=" .. contents.count) |
58 | for k,v in pairs(contents.fifo) do | 58 | for k,v in pairs(contents.fifo) do |
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 | ||
7 | local lanes = require "lanes".configure{ with_timers = false, nb_keepers = 200} | 7 | local lanes = require "lanes".configure{ with_timers = false, nb_keepers = 200} |
8 | 8 | ||
9 | do | ||
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) | ||
15 | end | ||
16 | |||
9 | local print_id = 0 | 17 | local print_id = 0 |
10 | local PRINT = function(...) | 18 | local PRINT = function(...) |
11 | print_id = print_id + 1 | 19 | print_id = print_id + 1 |
@@ -33,6 +41,7 @@ local B= keeper( lindaB ) | |||
33 | 41 | ||
34 | local lindaC= lanes.linda( "C", 3) | 42 | local lindaC= lanes.linda( "C", 3) |
35 | local C= keeper( lindaC ) | 43 | local C= keeper( lindaC ) |
44 | print("Created", lindaA, lindaB, lindaC) | ||
36 | 45 | ||
37 | A.some= 1 | 46 | A.some= 1 |
38 | PRINT("A.some == " .. A.some ) | 47 | PRINT("A.some == " .. A.some ) |