Supress more warnings

This commit is contained in:
Phil Nash 2011-09-29 08:58:40 +01:00
parent 7df1ba0926
commit 0afab69c7d
4 changed files with 16 additions and 0 deletions

View File

@ -194,6 +194,7 @@ namespace Catch
return setErrorMode( m_command + " does not accept arguments" ); return setErrorMode( m_command + " does not accept arguments" );
m_config.setShowHelp( true ); m_config.setShowHelp( true );
break; break;
case modeError:
default: default:
break; break;
} }

View File

@ -211,6 +211,11 @@ namespace Catch
case ResultWas::ExplicitFailure: case ResultWas::ExplicitFailure:
m_config.stream() << "failed with message: '" << resultInfo.getMessage() << "'"; m_config.stream() << "failed with message: '" << resultInfo.getMessage() << "'";
break; break;
case ResultWas::Unknown: // These cases are here to prevent compiler warnings
case ResultWas::Ok:
case ResultWas::FailureBit:
case ResultWas::ExpressionFailed:
case ResultWas::Exception:
default: default:
if( !resultInfo.hasExpression() ) if( !resultInfo.hasExpression() )
{ {

View File

@ -156,6 +156,10 @@ namespace Catch
case ResultWas::Ok: case ResultWas::Ok:
stats.m_element = "success"; stats.m_element = "success";
break; break;
case ResultWas::Unknown:
case ResultWas::FailureBit:
case ResultWas::Exception:
case ResultWas::DidntThrowException:
default: default:
stats.m_element = "unknown"; stats.m_element = "unknown";
break; break;

View File

@ -153,6 +153,12 @@ namespace Catch
.writeText( resultInfo.getMessage() ); .writeText( resultInfo.getMessage() );
m_currentTestSuccess = false; m_currentTestSuccess = false;
break; break;
case ResultWas::Unknown:
case ResultWas::Ok:
case ResultWas::FailureBit:
case ResultWas::ExpressionFailed:
case ResultWas::Exception:
case ResultWas::DidntThrowException:
default: default:
break; break;
} }