/[mojave]/metaprl/theories/mc/tests/mp_mc_test_connect_base.ml
ViewVC logotype

Diff of /metaprl/theories/mc/tests/mp_mc_test_connect_base.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3579 by emre, Wed Apr 3 08:37:31 2002 UTC revision 3580 by emre, Fri Apr 19 08:09:21 2002 UTC
# Line 106  Line 106 
106        else        else
107           print_fail ()           print_fail ()
108    
109    let sub_block_test sub_block str =
110       printf "--> Test: %s\n" str;
111       let t = term_of_sub_block sub_block in
112       let t' = sub_block_of_term t in
113          print_simple_term t;
114          if t' = sub_block then
115             print_pass ()
116          else
117             print_fail ()
118    
119    let sub_value_test sub_value str =
120       printf "--> Test: %s\n" str;
121       let t = term_of_sub_value sub_value in
122       let t' = sub_value_of_term t in
123          print_simple_term t;
124          if t' = sub_value then
125             print_pass ()
126          else
127             print_fail ()
128    
129    let sub_index_test sub_index str =
130       printf "--> Test: %s\n" str;
131       let t = term_of_sub_index sub_index in
132       let t' = sub_index_of_term t in
133          print_simple_term t;
134          if t' = sub_index then
135             print_pass ()
136          else
137             print_fail ()
138    
139    let sub_script_test sub_script str =
140       printf "--> Test: %s\n" str;
141       let t = term_of_sub_script sub_script in
142       let t' = sub_script_of_term t in
143          print_simple_term t;
144          if t' = sub_script then
145             print_pass ()
146          else
147             print_fail ()
148    
149    let subop_test subop str =
150       printf "--> Test: %s\n" str;
151       let t = term_of_subop subop in
152       let t' = subop_of_term t in
153          print_simple_term t;
154          if t' = subop then
155             print_pass ()
156          else
157             print_fail ()
158    
159  (*  (*
160   * Define a function to run all the tests.   * Define a function to run all the tests.
161   *)   *)
# Line 124  Line 174 
174     set_test (IntSet set1) "[-3,3] (IntSet)";     set_test (IntSet set1) "[-3,3] (IntSet)";
175     set_test (RawIntSet set2) "[-3,3] (RawIntSet)";     set_test (RawIntSet set2) "[-3,3] (RawIntSet)";
176    
177       (* Subscript operators. *)
178       sub_block_test BlockSub "BlockSub";
179       sub_block_test RawDataSub "RawDataSub";
180       sub_block_test TupleSub "TupleSub";
181       sub_block_test RawTupleSub "RawTupleSub";
182       sub_value_test PolySub "PolySub";
183       sub_value_test (RawIntSub Int8 false) "RawIntSub Int8 false";
184       sub_value_test (RawFloatSub Single) "RawFloatSub Single";
185       sub_value_test PointerSub "PointerSub";
186       sub_value_test FunctionSub "FunctionSub";
187       sub_index_test ByteIndex "ByteIndex";
188       sub_index_test WordIndex "WordIndex";
189       sub_script_test IntIndex "IntIndex";
190       sub_script_test (RawIntIndex Int8 true) "RawIntIndex Int8 true";
191       let op = { sub_block = BlockSub;  sub_value = PolySub;
192                  sub_index = ByteIndex; sub_script = IntIndex } in
193       subop_test op "{ BlockSub; PolySub; ByteIndex; IntIndex }";
194    
195     (* Done. *)     (* Done. *)
196     !fail_count     !fail_count

Legend:
Removed from v.3579  
changed lines
  Added in v.3580

  ViewVC Help
Powered by ViewVC 1.1.26