Fixed formatting
This commit is contained in:
@@ -79,8 +79,7 @@ std::string generator::name(relationship_t r) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void generator::generate(
|
void generator::generate(const package &p, std::ostream &ostr) const
|
||||||
const package &p, std::ostream &ostr) const
|
|
||||||
{
|
{
|
||||||
const auto uns = m_config.using_namespace;
|
const auto uns = m_config.using_namespace;
|
||||||
|
|
||||||
|
|||||||
@@ -149,9 +149,9 @@ bool starts_with(const std::vector<T> &col, const std::vector<T> &prefix)
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void remove_prefix(std::vector<T> &col, const std::vector<T> &prefix)
|
void remove_prefix(std::vector<T> &col, const std::vector<T> &prefix)
|
||||||
{
|
{
|
||||||
if(!starts_with(col, prefix))
|
if (!starts_with(col, prefix))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
col = std::vector<T>(col.begin()+prefix.size(), col.end());
|
col = std::vector<T>(col.begin() + prefix.size(), col.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,9 +165,10 @@ unsigned int rngSeed();
|
|||||||
//
|
//
|
||||||
// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
|
// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented.
|
||||||
#if !defined(__ibmxl__) && !defined(__CUDACC__)
|
#if !defined(__ibmxl__) && !defined(__CUDACC__)
|
||||||
#define CATCH_INTERNAL_IGNORE_BUT_WARN(...) \
|
#define CATCH_INTERNAL_IGNORE_BUT_WARN(...) \
|
||||||
(void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, \
|
(void)__builtin_constant_p( \
|
||||||
hicpp-vararg) */
|
__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, \
|
||||||
|
hicpp-vararg) */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
#define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||||
@@ -4648,31 +4649,33 @@ auto makeMatchExpr(ArgT const &arg, MatcherT const &matcher,
|
|||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
#define INTERNAL_CATCH_THROWS_MATCHES( \
|
#define INTERNAL_CATCH_THROWS_MATCHES( \
|
||||||
macroName, exceptionType, resultDisposition, matcher, ...) \
|
macroName, exceptionType, resultDisposition, matcher, ...) \
|
||||||
do { \
|
do { \
|
||||||
Catch::AssertionHandler catchAssertionHandler(macroName##_catch_sr, \
|
Catch::AssertionHandler catchAssertionHandler(macroName##_catch_sr, \
|
||||||
CATCH_INTERNAL_LINEINFO, \
|
CATCH_INTERNAL_LINEINFO, \
|
||||||
CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) "," \
|
CATCH_INTERNAL_STRINGIFY( \
|
||||||
" " CATCH_INTERNAL_STRINGIFY( \
|
__VA_ARGS__) "," \
|
||||||
exceptionType) "," \
|
" " CATCH_INTERNAL_STRINGIFY( \
|
||||||
" " CATCH_INTERNAL_STRINGIFY(matcher), \
|
exceptionType) "," \
|
||||||
resultDisposition); \
|
" " CATCH_INTERNAL_STRINGIFY( \
|
||||||
if (catchAssertionHandler.allowThrows()) \
|
matcher), \
|
||||||
try { \
|
resultDisposition); \
|
||||||
static_cast<void>(__VA_ARGS__); \
|
if (catchAssertionHandler.allowThrows()) \
|
||||||
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
|
try { \
|
||||||
} \
|
static_cast<void>(__VA_ARGS__); \
|
||||||
catch (exceptionType const &ex) { \
|
catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \
|
||||||
catchAssertionHandler.handleExpr( \
|
} \
|
||||||
Catch::makeMatchExpr(ex, matcher, #matcher##_catch_sr)); \
|
catch (exceptionType const &ex) { \
|
||||||
} \
|
catchAssertionHandler.handleExpr( \
|
||||||
catch (...) { \
|
Catch::makeMatchExpr(ex, matcher, #matcher##_catch_sr)); \
|
||||||
catchAssertionHandler.handleUnexpectedInflightException(); \
|
} \
|
||||||
} \
|
catch (...) { \
|
||||||
else \
|
catchAssertionHandler.handleUnexpectedInflightException(); \
|
||||||
catchAssertionHandler.handleThrowingCallSkipped(); \
|
} \
|
||||||
INTERNAL_CATCH_REACT(catchAssertionHandler) \
|
else \
|
||||||
|
catchAssertionHandler.handleThrowingCallSkipped(); \
|
||||||
|
INTERNAL_CATCH_REACT(catchAssertionHandler) \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
// end catch_capture_matchers.h
|
// end catch_capture_matchers.h
|
||||||
|
|||||||
Reference in New Issue
Block a user