This repository has been archived on 2020-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
FediPotato/tests/test_load_library.cpp

50 lines
1.3 KiB
C++

/* This file is part of FediPotato.
* Copyright © 2020 tastytea <tastytea@tastytea.de>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "environment_variables.hpp"
#include "fedipotato.hpp"
#include <catch.hpp>
#include <exception>
namespace FediPotato
{
SCENARIO ("Load FediPotato.")
{
set_environment_variables();
bool exception{false};
WHEN ("Instance of FediPotato is constructed.")
{
try
{
FediPotato potato("FediPotato");
}
catch (const std::exception &e)
{
exception = true;
}
THEN ("No exception is thrown.")
{
REQUIRE_FALSE(exception);
}
}
}
} // namespace FediPotato