diff --git a/tests/testParser.c b/tests/testParser.c index 04745c5a701b390401494f8f1f8e5df00fac9742..55b3adb6102a5bdf976c77ff4be64837a3f67cc8 100644 --- a/tests/testParser.c +++ b/tests/testParser.c @@ -33,6 +33,7 @@ int main(int argc, char *argv[]) { int no_of_threads = 0; int no_of_time_steps = 0; float max_h = 0.0f; + double start_time = 0.0; char ic_file [PARSER_MAX_LINE_SIZE]; /* Read the parameter file. */ @@ -47,14 +48,16 @@ int main(int argc, char *argv[]) { parser_get_param_int(¶m_file,"no_of_threads",&no_of_threads); parser_get_param_int(¶m_file,"no_of_time_steps",&no_of_time_steps); parser_get_param_float(¶m_file,"max_h",&max_h); + parser_get_param_double(¶m_file,"start_time",&start_time); parser_get_param_string(¶m_file,"ic_file",ic_file); /* Print the variables to check their values are correct. */ - printf("no_of_threads: %d, no_of_time_steps: %d, max_h: %f, ic_file: %s\n",no_of_threads, no_of_time_steps, max_h, ic_file); + printf("no_of_threads: %d, no_of_time_steps: %d, max_h: %f, start_time: %lf, ic_file: %s\n",no_of_threads, no_of_time_steps, max_h, start_time, ic_file); assert(no_of_threads == 16); assert(no_of_time_steps == 10); assert(fabs(max_h - 1.1255) < 0.00001); + assert(fabs(start_time - 1.23456789) < 0.00001); assert(strcmp(ic_file,"ic_file.ini") == 0); /*strcmp returns 0 if correct.*/ return 0; diff --git a/tests/testParserInput.yaml b/tests/testParserInput.yaml index 08a488b04fcae1de9c70bd264bdab360e7da5e0d..d695e6a8ddd327e31224f36a6e34767ea8d36408 100644 --- a/tests/testParserInput.yaml +++ b/tests/testParserInput.yaml @@ -1,7 +1,9 @@ --- no_of_threads: 16 # The number of threads that will be used. no_of_time_steps: 10 -max_h: 1.1255 +max_h: 1.1255 +start_time: 1.23456789 #Input file -ic_file: ic_file.ini +ic_file: ic_file.ini + ...