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/variable.sh

    r9197 r10311  
    1414 test12
    1515 test13
     16 test14
    1617 testmem1
    1718 testmem2
     
    4142end
    4243
    43 #
     44# do math expressions assign the correct value (test2 -> test8)
    4445macro test2
    4546
     
    5758end
    5859
    59 # do we loop up in small steps correctly?
    6060macro test3
    6161
     
    7373end
    7474
    75 # do we loop down in small steps correctly?
    7675macro test4
    7776
     
    8988end
    9089
    91 # do we loop down in small steps correctly?
    9290macro test5
    9391
     
    105103end
    106104
    107 # do we loop down in small steps correctly?
    108105macro test6
    109106
     
    121118end
    122119
    123 # do we loop down in small steps correctly?
     120# testing operation priority
    124121macro test7
    125122
    126   local i
     123  local i j
    127124
    128125  $i = 2 - 3*2
    129 
    130  if ($i == -4)
     126  $j = 10/2*5+5
     127
     128 if (($i == -4) && ($j == 30))
     129   $PASS = 1
     130 else
     131   $PASS = 0
     132   echo "i: $i\ j: $j"
     133 end
     134
     135end
     136
     137# testing math on negative numbers
     138macro test8
     139
     140  local i
     141
     142  $i = -2 - -3
     143
     144 if ($i == 1)
    131145   $PASS = 1
    132146 else
     
    137151end
    138152
    139 # do we loop down in small steps correctly?
    140 macro test8
    141 
    142   local i
    143 
    144   $i = -2 - -3
    145 
    146  if ($i == 1)
    147    $PASS = 1
    148  else
    149    $PASS = 0
    150    echo "i: $i"
    151  end
    152 
    153 end
    154 
    155 # do we loop down in small steps correctly?
     153# testing the existance of variables
    156154macro test9
    157155
     
    237235end
    238236
     237# test local variables
     238macro test14
     239
     240 $PASS = 1
     241
     242 if (($?i == 1) || ($?N == 1))
     243  $PASS = 0
     244 end
     245end
     246
    239247# check memleaks (set global)
    240248macro testmem1
     
    495503 end
    496504end
    497 
Note: See TracChangeset for help on using the changeset viewer.