feat(cpp-object-oriented-modular-refactoring): step 3 - foundation-google-style
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "fesa/build_info.hpp"
|
||||
#include "fesa/build_info.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -8,20 +8,20 @@
|
||||
#include <type_traits>
|
||||
|
||||
TEST(BuildInfo, VersionIsStableAndNonEmpty) {
|
||||
const std::string_view first = fesa::solverVersion();
|
||||
const std::string_view second = fesa::solverVersion();
|
||||
const std::string_view first = fesa::SolverVersion();
|
||||
const std::string_view second = fesa::SolverVersion();
|
||||
|
||||
EXPECT_FALSE(first.empty());
|
||||
EXPECT_EQ(first, second);
|
||||
EXPECT_TRUE(std::regex_match(
|
||||
std::string(first), std::regex{R"(^[0-9]+\.[0-9]+\.[0-9]+$)"}));
|
||||
EXPECT_FALSE(first.empty());
|
||||
EXPECT_EQ(first, second);
|
||||
EXPECT_TRUE(std::regex_match(std::string(first),
|
||||
std::regex{R"(^[0-9]+\.[0-9]+\.[0-9]+$)"}));
|
||||
}
|
||||
|
||||
TEST(BuildInfo, PublicHeaderHasNoBackendDependency) {
|
||||
static_assert(
|
||||
std::is_same_v<decltype(fesa::solverVersion()), std::string_view>,
|
||||
"The public BuildInfo API must use only a standard-library value type.");
|
||||
static_assert(noexcept(fesa::solverVersion()));
|
||||
static_assert(
|
||||
std::is_same_v<decltype(fesa::SolverVersion()), std::string_view>,
|
||||
"The public BuildInfo API must use only a standard-library value type.");
|
||||
static_assert(noexcept(fesa::SolverVersion()));
|
||||
|
||||
SUCCEED();
|
||||
SUCCEED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user