IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2006, 9:02:30 AM (20 years ago)
Author:
eugene
Message:

updated tests from mark pitts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/test/math.sh

    r9360 r10311  
    22list tests
    33 test1
     4 test2
    45 testmem1
    56 testmem2
     
    89end
    910
     11# test subtraction
    1012macro test1
    1113
     14  $PASS = 1
    1215  local i
    1316
     
    2629end
    2730
     31# test addition, division, and multiplication
     32macro test2
     33
     34 $PASS = 1
     35 local a b c
     36
     37 $a = {2 + 4}
     38 $b = {12 / 2}
     39 $c = {2 * 3}
     40
     41 if (($a != 6) || ($b != 6) || ($c != 6))
     42   $PASS = 0
     43   echo "ALL VALUES NOT 6: a=$a\ b=$b\ c=$c\"
     44 end
     45
     46end
     47
    2848# check memleaks (set global)
    2949macro testmem1
    3050
     51 $PASS = 1
    3152 local i
    3253
     
    5374macro testmem2
    5475
     76 $PASS = 1
    5577 local i N
    5678
     
    6183 for i 0 10000
    6284   $N = 99 - 98
     85   $N = 1 + 1
     86   $N = 2 * 2
     87   $N = 22/7
    6388 end   
    6489 output stdout
     
    77102macro testmem3
    78103
     104 $PASS = 1
    79105 local i N
    80106
     
    101127macro testmem4
    102128
     129 $PASS = 1
    103130 local i N
    104131
Note: See TracChangeset for help on using the changeset viewer.