Print test summary

This commit is contained in:
2022-06-05 23:43:45 +02:00
parent 5490f6ce1c
commit b34e14f36b
97 changed files with 11844 additions and 1575 deletions

36
source/result.cpp Normal file
View File

@ -0,0 +1,36 @@
#include "elna/source/result.hpp"
#include "elna/source/types.hpp"
namespace elna::source
{
error::error(const std::filesystem::path& path, const position position)
: m_position(position), m_path(path)
{
}
std::size_t error::line() const noexcept
{
return this->m_position.line;
}
std::size_t error::column() const noexcept
{
return this->m_position.column;
}
const std::filesystem::path& error::path() const noexcept
{
return this->m_path;
}
name_collision::name_collision(const std::string& name, const std::filesystem::path& path,
const position current, const position previous)
: error(path, current), name(name), previous(previous)
{
}
std::string name_collision::what() const
{
return "Name '" + name + "' was already defined";
}
}