diff options
author | Prabhu Ramachandran | 2014-06-06 10:42:05 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2014-06-06 10:42:05 +0530 |
commit | 8b5d13df2a8f4ac3acc075c522128722b987e57b (patch) | |
tree | 5097f9bada96d00ad1c9b30b691723f1c2b07c18 /testapp/scilab_files/test_add.sce | |
parent | dff8905769f900b17124a6cf2c79ec5678faed66 (diff) | |
parent | 83b3d80a2cdc2a342a521fe71cad72e081d6df5f (diff) | |
download | online_test-8b5d13df2a8f4ac3acc075c522128722b987e57b.tar.gz online_test-8b5d13df2a8f4ac3acc075c522128722b987e57b.tar.bz2 online_test-8b5d13df2a8f4ac3acc075c522128722b987e57b.zip |
Merge pull request #20 from prathamesh920/scilab_autocheck
Scilab autocheck
Diffstat (limited to 'testapp/scilab_files/test_add.sce')
-rw-r--r-- | testapp/scilab_files/test_add.sce | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testapp/scilab_files/test_add.sce b/testapp/scilab_files/test_add.sce new file mode 100644 index 0000000..a317cdb --- /dev/null +++ b/testapp/scilab_files/test_add.sce @@ -0,0 +1,29 @@ +mode(-1) +exec("function.sci",-1); +i = 0 +p = add(3,5); +correct = (p == 8); +if correct then + i=i+1 +end +disp("Input submitted 3 and 5") +disp("Expected output 8 got " + string(p)) +p = add(22,-20); +correct = (p==2); +if correct then + i=i+1 +end +disp("Input submitted 22 and -20") +disp("Expected output 2 got " + string(p)) +p =add(91,0); +correct = (p==91); +if correct then + i=i+1 +end +disp("Input submitted 91 and 0") +disp("Expected output 91 got " + string(p)) +if i==3 then + exit(5); +else + exit(3); +end |