- fprintf(stderr,"==== Validation test (ERROR EXPECTED: too many elements)\n");
- set=make_set();
- xbt_cfg_set_parse(set,"hostname:toto:42");
- xbt_cfg_set_parse(set,"speed:42 speed:24 speed:34");
+ fprintf(stderr,"==== Validation test with too much values of 'speed'\n");
+ set=make_set();
+ xbt_cfg_set_parse(set,"hostname:toto:42 user:alegrand");
+ TRY {
+ xbt_cfg_set_parse(set,"speed:42 speed:24 speed:34");
+ } CATCH(e) {
+ if (e.category != mismatch_error ||
+ strncmp(e.msg,"Cannot add value 34 to the config elem speed",
+ strlen("Config elem speed needs")))
+ RETHROW;
+ xbt_ex_free(e);
+ }