diff options
-rw-r--r-- | deep_test/deeptest.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deep_test/deeptest.lua b/deep_test/deeptest.lua index bab91d9..1c34cf8 100644 --- a/deep_test/deeptest.lua +++ b/deep_test/deeptest.lua | |||
@@ -74,7 +74,9 @@ local performTest = function( obj_) | |||
74 | l:set( "key", obj_, t) | 74 | l:set( "key", obj_, t) |
75 | -- when obj_ is a deep userdata, out is the same userdata as obj_ (not another one pointing on the same deep memory block) because of an internal cache table [deep*] -> proxy) | 75 | -- when obj_ is a deep userdata, out is the same userdata as obj_ (not another one pointing on the same deep memory block) because of an internal cache table [deep*] -> proxy) |
76 | -- when obj_ is a clonable userdata, we get a different clone everytime we cross a linda or lane barrier | 76 | -- when obj_ is a clonable userdata, we get a different clone everytime we cross a linda or lane barrier |
77 | printDeep( "out of linda:", l:get( "key", 2)) | 77 | local _n, _val1, _val2 = l:get( "key", 2) |
78 | assert(_n == (_val2 and 2 or 1)) | ||
79 | printDeep( "out of linda:", _val1, _val2) | ||
78 | 80 | ||
79 | -- send the object in a lane through parameter passing, the lane body returns it as return value, read the contents | 81 | -- send the object in a lane through parameter passing, the lane body returns it as return value, read the contents |
80 | local g = lanes.gen( | 82 | local g = lanes.gen( |
@@ -88,7 +90,9 @@ local performTest = function( obj_) | |||
88 | -- read contents inside lane: obj_ and t by upvalue | 90 | -- read contents inside lane: obj_ and t by upvalue |
89 | printDeep( "in lane, as upvalues:", obj_, t) | 91 | printDeep( "in lane, as upvalues:", obj_, t) |
90 | -- read contents inside lane: in linda | 92 | -- read contents inside lane: in linda |
91 | printDeep( "in lane, from linda:", l:get("key", 2)) | 93 | local _n, _val1, _val2 = l:get( "key", 2) |
94 | assert(_n == (_val2 and 2 or 1)) | ||
95 | printDeep( "in lane, from linda:", _val1, _val2) | ||
92 | return arg_, t_ | 96 | return arg_, t_ |
93 | end | 97 | end |
94 | ) | 98 | ) |