Modify

Opened 8 years ago

Closed 10 months ago

#3616 closed Bugs (invalid)

Boost.Test Xcode formatter not working in Xcode 3.2

Reported by: Sean P. DeNigris <sean@…> Owned by: Gennadiy Rozental
Milestone: Boost 1.41.0 Component: test
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc:

Description

The build result format has changed to: [file path]:[line]: {warning|error}: [whatever] e.g. /path/to/source.cpp:42: error: something bad happened!

Right now, the formatter outputs [file path]:[line]: [whatever]

The "warning: " or "error: " is missing, so the issue is not properly displayed in Xcode

Possible solution:

  1. move Apple-specific code to log_entry_start e.g.:

void log_entry_start( std::ostream& output, boost::unit_test::log_entry_data const& entry_data, log_entry_types let ) {

switch( let ) {

...

case BOOST_UTL_ET_WARNING:

#ifdef APPLE_CC

output << file << ':' << line << ": warning: ";

#endif

print_prefix( output, entry_data.m_file_name, entry_data.m_line_num ); output << "warning in \"" << boost::unit_test::framework::current_test_case().p_name << "\": "; break;

case BOOST_UTL_ET_ERROR:

#ifdef APPLE_CC

output << file << ':' << line << ": error: ";

#endif

print_prefix( output, entry_data.m_file_name, entry_data.m_line_num ); output << "error in \"" << boost::unit_test::framework::current_test_case().p_name << "\": "; break;

...

I don't know what to do about "info" and "fatal error," because I don't know if there are corresponding levels in Xcode, but I'm posting the question to the Xcode users list.

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by Sean P. DeNigris <sean@…>

sorry... above lines: output << file << ':' << line <<... should be: output << entry_data.m_file_name << ':' << entry_data.m_line_num <<...

comment:2 Changed 8 years ago by Gennadiy Rozental

Am I correct to understand that the only issue is absence of ':' in between error|warning and 'in' in messages. For example: file:line: error: in <test_case> ... would have worked?

comment:3 Changed 8 years ago by Sean P. DeNigris <sean@…>

Yes, I think we actually want to insert "error: " and have "error" twice, as Xcode will eat the first one and keep the message intact - "file:line: error: error in <test_case>"

The only other issue is how to map info and fatal error. It seems fair to map info to warning and fatal error to error, so they would be:
file:line: warning: info from <test_case>
file:line: error: fatal error in <test_case>

comment:4 Changed 10 months ago by Raffi Enficiaud

Resolution: invalid
Status: newclosed

New versions of Xcode do not have this feature anymore

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Gennadiy Rozental.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.