Skip to content
Snippets Groups Projects
Commit ca6d71c2 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

STY: Formatting.

parent 042c35d7
No related branches found
No related tags found
1 merge request!12TEST: Test for numeric values.
Pipeline #12641 passed
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
...@@ -32,17 +32,15 @@ ...@@ -32,17 +32,15 @@
* @date 2021-07-07 * @date 2021-07-07
*/ */
#define EXPECT_THROW_MESSAGE(statement, exeption_type, message) \ #define EXPECT_THROW_MESSAGE(statement, exeption_type, message) \
EXPECT_THROW( \ EXPECT_THROW(try { statement; } catch (const exeption_type &e) { \
try { statement; } catch (const exeption_type &e) { \ EXPECT_EQ(std::string(e.what()), message); \
EXPECT_EQ(std::string(e.what()), message); \ throw; \
throw; \ }, \
}, \ exeption_type)
exeption_type)
#define ASSERT_THROW_MESSAGE(statement, exeption_type, message) \ #define ASSERT_THROW_MESSAGE(statement, exeption_type, message) \
ASSERT_THROW( \ ASSERT_THROW(try { statement; } catch (const exeption_type &e) { \
try { statement; } catch (const exeption_type &e) { \ ASSERT_EQ(std::string(e.what()), message); \
ASSERT_EQ(std::string(e.what()), message); \ throw; \
throw; \ }, \
}, \ exeption_type)
exeption_type)
#endif #endif
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
return values; return values;
} }
template <typename T> static auto getValueAs(const Value &value) -> T { template <typename T> static auto getValueAs(const Value & /*value*/) -> T {
throw std::logic_error("Template not implemented for this type."); throw std::logic_error("Template not implemented for this type.");
} }
static void DeleteEntities() { static void DeleteEntities() {
...@@ -698,7 +698,7 @@ auto test_numeric_values_impl(AtomicDataType a_type) -> void { ...@@ -698,7 +698,7 @@ auto test_numeric_values_impl(AtomicDataType a_type) -> void {
Entity prop; Entity prop;
prop.SetRole(Role::PROPERTY); prop.SetRole(Role::PROPERTY);
const auto name = const auto name =
std::string("Prop ") + boost::lexical_cast<std::string>(i); std::string("Prop ") + std::to_string(i);
std::cout << "Creating: " << name << std::endl; std::cout << "Creating: " << name << std::endl;
prop.SetName(name); prop.SetName(name);
prop.SetDataType(a_type); prop.SetDataType(a_type);
...@@ -721,7 +721,7 @@ auto test_numeric_values_impl(AtomicDataType a_type) -> void { ...@@ -721,7 +721,7 @@ auto test_numeric_values_impl(AtomicDataType a_type) -> void {
auto retrieve_transaction(connection->CreateTransaction()); auto retrieve_transaction(connection->CreateTransaction());
const auto prop = props_orig[i]; const auto prop = props_orig[i];
const auto name = const auto name =
std::string("Prop ") + boost::lexical_cast<std::string>(i); std::string("Prop ") + std::to_string(i);
std::cout << "Retrieving: " << name << std::endl; std::cout << "Retrieving: " << name << std::endl;
const auto query = std::string("FIND ENTITY \"") + name + "\""; const auto query = std::string("FIND ENTITY \"") + name + "\"";
retrieve_transaction->Query(query); retrieve_transaction->Query(query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment