Changeset 10311 for trunk/Ohana/src/opihi/cmd.basic/test/math.sh
- Timestamp:
- Nov 30, 2006, 9:02:30 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/test/math.sh (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/test/math.sh
r9360 r10311 2 2 list tests 3 3 test1 4 test2 4 5 testmem1 5 6 testmem2 … … 8 9 end 9 10 11 # test subtraction 10 12 macro test1 11 13 14 $PASS = 1 12 15 local i 13 16 … … 26 29 end 27 30 31 # test addition, division, and multiplication 32 macro 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 46 end 47 28 48 # check memleaks (set global) 29 49 macro testmem1 30 50 51 $PASS = 1 31 52 local i 32 53 … … 53 74 macro testmem2 54 75 76 $PASS = 1 55 77 local i N 56 78 … … 61 83 for i 0 10000 62 84 $N = 99 - 98 85 $N = 1 + 1 86 $N = 2 * 2 87 $N = 22/7 63 88 end 64 89 output stdout … … 77 102 macro testmem3 78 103 104 $PASS = 1 79 105 local i N 80 106 … … 101 127 macro testmem4 102 128 129 $PASS = 1 103 130 local i N 104 131
Note:
See TracChangeset
for help on using the changeset viewer.
