diff options
author | marris <marris@google.com> | 2015-06-18 20:08:10 +0300 |
---|---|---|
committer | marris <marris@google.com> | 2015-06-18 20:08:10 +0300 |
commit | a06dcaeb88f05678132c37d3a98c3aad0fb441b8 (patch) | |
tree | d608e1b3a710a05945168555e08b31e7e6664089 | |
parent | fed11c52fa5b3e03a0548d612d5f507b328a3800 (diff) |
Added a primitive test file for gaussianpyramid
-rw-r--r-- | test/test_gaussianpyramid.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test_gaussianpyramid.lua b/test/test_gaussianpyramid.lua new file mode 100644 index 0000000..f0fc603 --- /dev/null +++ b/test/test_gaussianpyramid.lua @@ -0,0 +1,25 @@ +require 'totem' +require 'image' + + +local tester = totem.Tester() + + +local tests = {} + +function tests.doesNotCrash() + -- Char, Short and Int tensors not supported. + types = { + 'torch.ByteTensor', + 'torch.FloatTensor', + 'torch.DoubleTensor' + } + for _, type in ipairs(types) do + local output = unpack(image.gaussianpyramid(torch.rand(8, 8):type(type), {0.5})) + tester:assert(output:type() == type, 'Type ' .. type .. ' produces a different output.') + end +end + + +return tester:add(tests):run() + |