File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -90,17 +90,21 @@ static void output_goals_json(
90
90
log .status () << messaget::eom; // force end of previous message
91
91
json_stream_objectt &json_result =
92
92
ui_message_handler.get_json_stream ().push_back_stream_object ();
93
+ json_stream_arrayt &goals_array = json_result.push_back_stream_array (" goals" );
93
94
for (const auto &property_pair : properties)
94
95
{
95
96
const property_infot &property_info = property_pair.second ;
96
97
97
- json_result[" status" ] = json_stringt (
98
+ json_objectt json_goal;
99
+ json_goal[" status" ] = json_stringt (
98
100
property_info.status == property_statust::FAIL ? " satisfied" : " failed" );
99
- json_result [" goal" ] = json_stringt (property_pair.first );
100
- json_result [" description" ] = json_stringt (property_info.description );
101
+ json_goal [" goal" ] = json_stringt (property_pair.first );
102
+ json_goal [" description" ] = json_stringt (property_info.description );
101
103
102
104
if (property_info.pc ->source_location .is_not_nil ())
103
- json_result[" sourceLocation" ] = json (property_info.pc ->source_location );
105
+ json_goal[" sourceLocation" ] = json (property_info.pc ->source_location );
106
+
107
+ goals_array.push_back (std::move (json_goal));
104
108
}
105
109
json_result[" totalGoals" ] = json_numbert (std::to_string (properties.size ()));
106
110
const std::size_t goals_covered =
You can’t perform that action at this time.
0 commit comments