summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKRIXUS-alpha2021-05-12 16:20:41 +0530
committerKRIXUS-alpha2021-05-12 16:20:41 +0530
commit4577cf0e9028018bffbf5be5fea3c4d86a8f9474 (patch)
tree81f3693a09650369f1ceb9e962021ea84d9df095 /tests
parentd5d77fe4d8f3cd14dc3083ae0e5687b4f56976e4 (diff)
parentd8bc1ab06ffaa8644c16f01c22a9d3df6b5ede1e (diff)
downloadfossee-scilab-octave-toolbox-4577cf0e9028018bffbf5be5fea3c4d86a8f9474.tar.gz
fossee-scilab-octave-toolbox-4577cf0e9028018bffbf5be5fea3c4d86a8f9474.tar.bz2
fossee-scilab-octave-toolbox-4577cf0e9028018bffbf5be5fea3c4d86a8f9474.zip
Merge branch 'master' of https://github.com/shag527/fossee-scilab-octave-toolbox into documentation
Diffstat (limited to 'tests')
-rw-r--r--tests/test.sce55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/test.sce b/tests/test.sce
index b3a7993..edae0e7 100644
--- a/tests/test.sce
+++ b/tests/test.sce
@@ -370,6 +370,61 @@ else
disp("cheb2ord Test failed")
end
+/////////Test case for base64encode //////////
+
+s = octave_fun("base64encode","strings","Hakuna Matata","true");
+
+if(s == "SGFrdW5hIE1hdGF0YQ==")
+ test_pass=[test_pass,1]
+else
+ test_pass=[test_pass,0]
+ disp("base64encode Test failed")
+end
+
+/////////Test case for getfields //////////
+
+st = struct('double',25.25,'string','c++','complex',4 + 3*%i,'matrix',[1 2 3.56;4 5 6*%i]);
+[od,os,oc,om] = octave_fun("getfields","struct",st,'double','string','complex','matrix');
+
+if(od == 25.25 & os == "c++" & oc == 4 + 3*%i & om == [1 2 3.56;4 5 6*%i])
+ test_pass=[test_pass,1]
+else
+ test_pass=[test_pass,0]
+ disp("getfields Test failed")
+end
+
+/////////Test case for options //////////
+
+opt = octave_fun("options","control","string","c++","double",25.25,"complex",4 + 3*%i,"matrix",[1 2 3.56;4 5 6*%i])
+
+if(opt.string == "c++" & opt.double == 25.25 & opt.complex == 4 + 3*%i & opt.matrix == [1 2 3.56;4 5 6*%i])
+ test_pass=[test_pass,1]
+else
+ test_pass=[test_pass,0]
+ disp("options Test failed")
+end
+
+/////////Test case for poly2trellis //////////
+
+trellis = octave_fun("poly2trellis","communications",[4 3],[4 5 17;7 4 2]);
+
+if(trellis.numInputSymbols == 4)
+ test_pass=[test_pass,1]
+else
+ test_pass=[test_pass,0]
+ disp("poly2trellis Test failed")
+end
+
+/////////Test case for convenc //////////
+
+//code = octave_fun("convenc","communications",ones(100,1),trellis);
+
+//if(size(code) == [150 1])
+// test_pass=[test_pass,1]
+//else
+// test_pass=[test_pass,0]
+// disp("convenc Test failed")
+//end
/////////////////////////////////////////////
res=find(test_pass==0)