fixed backend test compilation
This commit is contained in:
@@ -4,21 +4,21 @@
|
||||
|
||||
#include "matador/sql/connection.hpp"
|
||||
#include "matador/sql/column_generator.hpp"
|
||||
#include "matador/sql/query.hpp"
|
||||
#include "matador/query/query.hpp"
|
||||
|
||||
#include "QueryFixture.hpp"
|
||||
|
||||
#include "models/location.hpp"
|
||||
|
||||
using namespace matador::query;
|
||||
using namespace matador::sql;
|
||||
using namespace matador::test;
|
||||
|
||||
class TypeTraitsTestFixture : public QueryFixture
|
||||
{
|
||||
public:
|
||||
TypeTraitsTestFixture()
|
||||
{
|
||||
db.open();
|
||||
TypeTraitsTestFixture() {
|
||||
REQUIRE(db.open());
|
||||
const auto res = query::create()
|
||||
.table<location>("location", schema)
|
||||
.execute(db);
|
||||
@@ -26,9 +26,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with type traits", "[typetraits]")
|
||||
{
|
||||
schema.attach<location>("location");
|
||||
TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with type traits", "[typetraits]") {
|
||||
REQUIRE(schema.attach<location>("location"));
|
||||
SECTION("Insert and select with direct execution") {
|
||||
location loc{1, "center", {1, 2, 3}, Color::Black};
|
||||
|
||||
@@ -58,9 +57,8 @@ TEST_CASE_METHOD(TypeTraitsTestFixture, "Special handling of attributes with typ
|
||||
.into("location", column_generator::generate<location>(schema, true))
|
||||
.values<location>()
|
||||
.prepare(db);
|
||||
|
||||
auto res = stmt
|
||||
.bind(loc)
|
||||
REQUIRE(stmt);
|
||||
auto res = stmt->bind(loc)
|
||||
.execute();
|
||||
REQUIRE(res.is_ok());
|
||||
REQUIRE(*res == 1);
|
||||
|
||||
Reference in New Issue
Block a user