Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

scilab: implement test bools

  • Loading branch information...
commit 68cb49600d407e6af5a3c74e387d3d02abd84188 1 parent 4aa870c
@smarchetto smarchetto authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 Examples/test-suite/scilab/bools_runme.sci
View
20 Examples/test-suite/scilab/bools_runme.sci
@@ -0,0 +1,20 @@
+exec("swigtest.start", -1);
+
+function checkBool(bool_val, expected_bool_val)
+ if typeof(bool_val) <> "boolean" then swigtesterror(); end
+ if bool_val <> expected_bool_val then swigtesterror(); end
+endfunction
+
+checkBool(constbool_get(), %f);
+
+checkBool(bool1_get(), %t);
+checkBool(bool2_get(), %f);
+
+checkBool(bo(%t), %t);
+checkBool(bo(%f), %f);
+
+bs = new_BoolStructure();
+checkBool(BoolStructure_m_bool1_get(bs), %t);
+checkBool(BoolStructure_m_bool2_get(bs), %f);
+
+exec("swigtest.quit", -1);

0 comments on commit 68cb496

Please sign in to comment.
Something went wrong with that request. Please try again.