Changeset ca83227 for tests


Ignore:
Timestamp:
Aug 31, 2021, 5:08:10 PM (3 years ago)
Author:
Jacob Prud'homme <jafprudhomme@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, pthread-emulation, qualifiedEnum
Children:
b0f225f
Parents:
45b772c
Message:

Changed API of parse_config to accept parse function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/parseconfig.cfa

    r45b772c rca83227  
    5050        sout | "Different types of destination addresses";
    5151
    52         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, TABULAR_CONFIG );
     52        parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    5353
    5454    sout | "Stop cost: " | config_params.stop_cost;
     
    6868        sout | "Open_Failure thrown when config file does not exist";
    6969        try {
    70                 parse_config( xstr(IN_DIR) "doesnt-exist.txt", entries, NUM_ENTRIES, TABULAR_CONFIG );
     70                parse_config( xstr(IN_DIR) "doesnt-exist.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    7171        } catch( Open_Failure * ex ) {
    7272                sout | "Failed to open the config file";
     
    7777        sout | "Missing_Config_Entries thrown when config file is missing entries we want";
    7878        try {
    79                 parse_config( xstr(IN_DIR) "parseconfig-missing.txt", entries, NUM_ENTRIES, TABULAR_CONFIG );
     79                parse_config( xstr(IN_DIR) "parseconfig-missing.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    8080        } catch( Missing_Config_Entries * ex ) {
    8181                msg( ex );
     
    9292
    9393        try {
    94                 parse_config( xstr(IN_DIR) "parseconfig-errors.txt", entry, 1, TABULAR_CONFIG );
     94                parse_config( xstr(IN_DIR) "parseconfig-errors.txt", entry, 1, parse_tabular_config_format );
    9595        } catch( Parse_Failure * ex ) {
    9696                msg( ex );
     
    106106
    107107        try {
    108                 parse_config( xstr(IN_DIR) "parseconfig-errors.txt", entries, NUM_ENTRIES, TABULAR_CONFIG );
     108                parse_config( xstr(IN_DIR) "parseconfig-errors.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    109109        } catch( Validation_Failure * ex ) {
    110110                msg( ex );
     
    115115        sout | "No error is thrown when validation succeeds";
    116116        config_params.stop_cost = -1; // Reset value
    117         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, TABULAR_CONFIG );
     117        parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    118118        sout | "Stop cost: " | config_params.stop_cost;
    119119        sout | nl;
     
    126126
    127127        config_params.stop_cost = -1; // Reset value
    128         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, TABULAR_CONFIG );
     128        parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    129129
    130130        sout | "Stop cost: " | config_params.stop_cost;
     
    139139
    140140        config_params.stop_cost = -1; // Reset value
    141         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, TABULAR_CONFIG );
     141        parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    142142
    143143        sout | "Stop cost: " | config_params.stop_cost;
Note: See TracChangeset for help on using the changeset viewer.