Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/argcheck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Collobert <ronan@collobert.com>2016-01-29 00:17:39 +0300
committerRonan Collobert <ronan@collobert.com>2016-01-29 00:17:39 +0300
commita7b8a29c17c9421f7567f1c36454060b1470edfb (patch)
tree516e7039a92c24c592c575fe5430f9e9df270bf8
parent1f1a43685f6fba2f4e27b7e305ea68a4037747c1 (diff)
added an extra test for obj:call()
-rw-r--r--test/test.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua
index e3046d2..19b969d 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -252,6 +252,17 @@ else
end
foobar.checksum = 1234567
+foobar.addnothing = argcheck{
+ {name="self", type="foobar"},
+ debug=true,
+ call =
+ function(self)
+ return self.checksum
+ end
+}
+
+assert(foobar:addnothing() == 1234567)
+
foobar.addfive = argcheck{
{name="self", type="foobar"},
{name="x", type="number"},