3 template <
int dim,
typename T>
6 bool pass_subtest1 =
false;
7 bool pass_subtest2 =
false;
8 bool pass_subtest3 =
false;
9 bool pass_subtest4 =
false;
10 bool pass_subtest5 =
false;
15 std::cout <<
"\nTesting 'parse_line'... " << std::endl;
21 dealii::ParameterHandler parameter_handler;
23 inputFileReader input_file_reader(
"parameters_test.in",variable_attributes);
26 std::string line =
"set Test entry = 3";
27 std::string keyword =
"set";
28 std::string entry_name =
"Test entry";
29 std::string out_string;
30 found_entry = input_file_reader.
parse_line(line,keyword,entry_name,out_string,
true);
32 std::cout << out_string <<
" " << found_entry << std::endl;
34 if (found_entry ==
true && boost::iequals(out_string,
"3")){
37 sprintf (buffer,
"Subtest 1 result for 'parse_line': %u\n", pass_subtest1);
41 line =
"set Test entry = 3";
43 entry_name =
"Test entry";
44 found_entry = input_file_reader.
parse_line(line,keyword,entry_name,out_string,
true);
46 if (found_entry ==
false){
49 sprintf (buffer,
"Subtest 2 result for 'parse_line': %u\n", pass_subtest2);
53 line =
"set Test entry = 3";
55 entry_name =
"Test entry wrong";
56 found_entry = input_file_reader.
parse_line(line,keyword,entry_name,out_string,
true);
58 if (found_entry ==
false){
61 sprintf (buffer,
"Subtest 3 result for 'parse_line': %u\n", pass_subtest3);
65 line =
"set Test entry = 3";
67 entry_name =
"Test entry wrong";
68 found_entry = input_file_reader.
parse_line(line,keyword,entry_name,out_string,
true);
70 if (found_entry ==
false){
73 sprintf (buffer,
"Subtest 4 result for 'parse_line': %u\n", pass_subtest4);
77 line =
"\tset Test entry = 3";
79 entry_name =
"Test entry";
80 found_entry = input_file_reader.
parse_line(line,keyword,entry_name,out_string,
true);
82 if (found_entry ==
true && boost::iequals(out_string,
"3")){
85 sprintf (buffer,
"Subtest 5 result for 'parse_line': %u\n", pass_subtest5);
89 if (pass_subtest4&&pass_subtest3&&pass_subtest2&&pass_subtest1) {pass=
true;}
91 sprintf (buffer,
"Test result for 'parse_line': %u\n", pass);