コード例 #1
0
/**
* Get the configuration for the simulation.
*
* First take default values for the simulation.
* Second take the values from the file 'fsin.conf'.
* Finally take the command line arguments.
* @param argn The number of arguments.
* @param args The arguments taken from the command line.
*/
void get_conf(long argn, char ** args) {
	long i;

	set_default_conf();
	get_conf_file(DEFAULT_CONF_FILE);
	for(i = 0; i < argn; ++i)
		get_option(args[i]);
	verify_conf();
}
コード例 #2
0
ファイル: check_xmpp.c プロジェクト: alk/libconflate
END_TEST

START_TEST (test_dup_with_host)
{
    conflate_config_t conf;

    init_config(&conf);
    conf.host = "example.com";
    int count = count_nulls(&conf);
    fail_unless(count == 0, "Expected exactly one null. Got: %d", count);

    verify_conf(&conf, dup_conf(conf));
}