Function add

Synopsis

#include <include/internal/catch_tag_alias_registry.h>

void add(std::string const &alias, std::string const &tag, SourceLineInfo const &lineInfo)

Description

No description yet.

Source

Lines 42-50 in include/internal/catch_tag_alias_registry.cpp. Line 23 in include/internal/catch_tag_alias_registry.h.

void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) {
    CATCH_ENFORCE( startsWith(alias, "[@") && endsWith(alias, ']'),
                  "error: tag alias, '" << alias << "' is not of the form [@alias name].\n" << lineInfo );
    CATCH_ENFORCE( m_registry.insert(std::make_pair(alias, TagAlias(tag, lineInfo))).second,
                  "error: tag alias, '" << alias << "' already registered.\n"
                  << "\tFirst seen at: " << find(alias)->lineInfo << "\n"
                  << "\tRedefined at: " << lineInfo );
}





Add Discussion as Guest

Log in