Skip to content

Commit

Permalink
tests used TypeUtils::classPureBasename for QSKIP
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Aug 19, 2022
1 parent 4139f2b commit df92e3a
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "orm/db.hpp"
#include "orm/exceptions/invalidargumenterror.hpp"
#include "orm/query/querybuilder.hpp"
#include "orm/utils/type.hpp"

#include "databases.hpp"

Expand All @@ -27,6 +28,7 @@ using Orm::Query::Builder;

using QueryBuilder = Orm::Query::Builder;
using QueryUtils = Orm::Utils::Query;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -119,7 +121,7 @@ void tst_QueryBuilder::initTestCase_data() const
const auto &connections = Databases::createConnections();

if (connections.isEmpty())
QSKIP(TestUtils::AutoTestSkippedAny.arg("tst_QueryBuilder")
QSKIP(TestUtils::AutoTestSkippedAny.arg(TypeUtils::classPureBasename(*this))
.toUtf8().constData(), );

QTest::addColumn<QString>("connection");
Expand Down
4 changes: 3 additions & 1 deletion tests/auto/functional/orm/tiny/model/tst_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ using Orm::Tiny::ConnectionOverride;
using Orm::Tiny::Exceptions::ModelNotFoundError;

using QueryUtils = Orm::Utils::Query;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -124,7 +125,8 @@ void tst_Model::initTestCase_data() const
const auto &connections = Databases::createConnections();

if (connections.isEmpty())
QSKIP(TestUtils::AutoTestSkippedAny.arg("tst_Model").toUtf8().constData(), );
QSKIP(TestUtils::AutoTestSkippedAny.arg(TypeUtils::classPureBasename(*this))
.toUtf8().constData(), );

QTest::addColumn<QString>("connection");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ using Orm::Exceptions::RecordsNotFoundError;
using Orm::Tiny::ConnectionOverride;
using Orm::Tiny::Exceptions::MassAssignmentError;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

using Models::FilePropertyProperty;
Expand Down Expand Up @@ -132,7 +134,7 @@ void tst_Model_Connection_Independent::initTestCase()

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped
.arg("tst_Model_Connection_Independent", Databases::MYSQL)
.arg(TypeUtils::classPureBasename(*this), Databases::MYSQL)
.toUtf8().constData(), );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ using Orm::Tiny::Relations::Relation;
using Orm::Tiny::TinyBuilder;

using QueryUtils = Orm::Utils::Query;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -226,7 +227,7 @@ void tst_Model_Relations::initTestCase_data() const
const auto &connections = Databases::createConnections();

if (connections.isEmpty())
QSKIP(TestUtils::AutoTestSkippedAny.arg("tst_Model_Relations")
QSKIP(TestUtils::AutoTestSkippedAny.arg(TypeUtils::classPureBasename(*this))
.toUtf8().constData(), );

QTest::addColumn<QString>("connection");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ using Orm::Constants::EMPTY;

using Orm::Tiny::ConnectionOverride;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

using Models::Phone;
Expand Down Expand Up @@ -45,7 +47,7 @@ void tst_Relations_Connection_Independent::initTestCase()

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped
.arg("tst_Relations_Connection_Independent", Databases::MYSQL)
.arg(TypeUtils::classPureBasename(*this), Databases::MYSQL)
.toUtf8().constData(), );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ using Orm::One;
using Orm::Tiny::AttributeItem;
using Orm::Tiny::ConnectionOverride;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

using Models::Tag;
Expand Down Expand Up @@ -112,7 +114,7 @@ void tst_Relations_Inserting_Updating::initTestCase_data() const
const auto &connections = Databases::createConnections();

if (connections.isEmpty())
QSKIP(TestUtils::AutoTestSkippedAny.arg("tst_Relations_Inserting_Updating")
QSKIP(TestUtils::AutoTestSkippedAny.arg(TypeUtils::classPureBasename(*this))
.toUtf8().constData(), );

QTest::addColumn<QString>("connection");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ using Orm::Tiny::Exceptions::ModelNotFoundError;

template<typename Model>
using TinyBuilder = Orm::Tiny::Builder<Model>;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -56,7 +57,7 @@ void tst_TinyBuilder::initTestCase_data() const
const auto &connections = Databases::createConnections();

if (connections.isEmpty())
QSKIP(TestUtils::AutoTestSkippedAny.arg("tst_TinyBuilder")
QSKIP(TestUtils::AutoTestSkippedAny.arg(TypeUtils::classPureBasename(*this))
.toUtf8().constData(), );

QTest::addColumn<QString>("connection");
Expand Down
7 changes: 6 additions & 1 deletion tests/auto/functional/tom/migrate/tst_migrate.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <QCoreApplication>
#include <QtTest>

#include "orm/utils/type.hpp"

#include "tom/application.hpp"
#include "tom/commands/migrations/statuscommand.hpp"

Expand All @@ -11,6 +13,8 @@
#include "migrations/2014_10_12_200000_create_properties_table.hpp"
#include "migrations/2014_10_12_300000_create_phones_table.hpp"

using TypeUtils = Orm::Utils::Type;

using TomApplication = Tom::Application;

using Tom::Commands::Migrations::StatusCommand;
Expand Down Expand Up @@ -142,7 +146,8 @@ void tst_Migrate::initTestCase()
Databases::createConnections({Databases::MYSQL, Databases::POSTGRESQL});

if (connections.isEmpty())
QSKIP(TestUtils::AutoTestSkippedAny.arg("tst_Migrate").toUtf8().constData(), );
QSKIP(TestUtils::AutoTestSkippedAny.arg(TypeUtils::classPureBasename(*this))
.toUtf8().constData(), );

QTest::addColumn<QString>("connection");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "orm/db.hpp"
#include "orm/mysqlconnection.hpp"
#include "orm/query/querybuilder.hpp"
#include "orm/utils/type.hpp"

#include "databases.hpp"

Expand All @@ -16,6 +17,7 @@ using Orm::DB;
using Orm::MySqlConnection;

using QueryBuilder = Orm::Query::Builder;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -53,7 +55,7 @@ void tst_DatabaseConnection::initTestCase_data() const
const auto &connections = Databases::createConnections();

if (connections.isEmpty())
QSKIP(TestUtils::AutoTestSkippedAny.arg("tst_DatabaseConnection")
QSKIP(TestUtils::AutoTestSkippedAny.arg(TypeUtils::classPureBasename(*this))
.toUtf8().constData(), );

QTest::addColumn<QString>("connection");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "orm/exceptions/recordsnotfounderror.hpp"
#include "orm/mysqlconnection.hpp"
#include "orm/query/querybuilder.hpp"
#include "orm/utils/type.hpp"

#include "databases.hpp"

Expand All @@ -33,6 +34,7 @@ using Orm::Query::Expression;

using QueryBuilder = Orm::Query::Builder;
using Raw = Orm::Query::Expression;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -248,8 +250,9 @@ void tst_MySql_QueryBuilder::initTestCase()
m_connection = Databases::createConnection(Databases::MYSQL);

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped.arg("tst_MySql_QueryBuilder", Databases::MYSQL)
.toUtf8().constData(), );
QSKIP(TestUtils::AutoTestSkipped
.arg(TypeUtils::classPureBasename(*this), Databases::MYSQL)
.toUtf8().constData(), );
}

void tst_MySql_QueryBuilder::version() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "orm/db.hpp"
#include "orm/query/querybuilder.hpp"
#include "orm/utils/type.hpp"

#include "databases.hpp"

Expand All @@ -21,6 +22,7 @@ using Orm::Query::Expression;

using QueryBuilder = Orm::Query::Builder;
using Raw = Orm::Query::Expression;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -147,7 +149,7 @@ void tst_PostgreSQL_QueryBuilder::initTestCase()

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped
.arg("tst_PostgreSQL_QueryBuilder", Databases::POSTGRESQL)
.arg(TypeUtils::classPureBasename(*this), Databases::POSTGRESQL)
.toUtf8().constData(), );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "orm/db.hpp"
#include "orm/query/querybuilder.hpp"
#include "orm/utils/type.hpp"

#include "databases.hpp"

Expand All @@ -21,6 +22,7 @@ using Orm::Query::Expression;

using QueryBuilder = Orm::Query::Builder;
using Raw = Orm::Query::Expression;
using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

Expand Down Expand Up @@ -146,7 +148,7 @@ void tst_SQLite_QueryBuilder::initTestCase()

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped
.arg("tst_SQLite_QueryBuilder", Databases::SQLITE)
.arg(TypeUtils::classPureBasename(*this), Databases::SQLITE)
.toUtf8().constData(), );
}

Expand Down
8 changes: 6 additions & 2 deletions tests/auto/unit/orm/schema/blueprint/tst_blueprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "orm/db.hpp"
#include "orm/schema/grammars/mysqlschemagrammar.hpp"
#include "orm/utils/type.hpp"

#include "databases.hpp"

Expand All @@ -15,6 +16,8 @@ using Orm::SchemaNs::Blueprint;
using Orm::SchemaNs::IndexCommand;
using Orm::SchemaNs::Grammars::MySqlSchemaGrammar;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

class tst_Blueprint : public QObject // clazy:exclude=ctor-missing-parent-argument
Expand Down Expand Up @@ -47,8 +50,9 @@ void tst_Blueprint::initTestCase()
m_connection = Databases::createConnection(Databases::MYSQL);

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped.arg("tst_Blueprint", Databases::MYSQL)
.toUtf8().constData(), );
QSKIP(TestUtils::AutoTestSkipped
.arg(TypeUtils::classPureBasename(*this), Databases::MYSQL)
.toUtf8().constData(), );
}

void tst_Blueprint::index_DefaultNames() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ using Orm::SchemaNs::Blueprint;
using Orm::SchemaNs::Constants::Cascade;
using Orm::SchemaNs::Constants::Restrict;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

class tst_MySql_SchemaBuilder : public QObject // clazy:exclude=ctor-missing-parent-argument
Expand Down Expand Up @@ -112,8 +114,9 @@ void tst_MySql_SchemaBuilder::initTestCase()
m_connection = Databases::createConnection(Databases::MYSQL);

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped.arg("tst_MySql_SchemaBuilder", Databases::MYSQL)
.toUtf8().constData(), );
QSKIP(TestUtils::AutoTestSkipped
.arg(TypeUtils::classPureBasename(*this), Databases::MYSQL)
.toUtf8().constData(), );
}

void tst_MySql_SchemaBuilder::createDatabase() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ using Orm::SchemaNs::Blueprint;
using Orm::SchemaNs::Constants::Cascade;
using Orm::SchemaNs::Constants::Restrict;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

class tst_PostgreSQL_SchemaBuilder : public QObject // clazy:exclude=ctor-missing-parent-argument
Expand Down Expand Up @@ -113,7 +115,7 @@ void tst_PostgreSQL_SchemaBuilder::initTestCase()

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped
.arg("tst_PostgreSQL_SchemaBuilder", Databases::POSTGRESQL)
.arg(TypeUtils::classPureBasename(*this), Databases::POSTGRESQL)
.toUtf8().constData(), );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ using Orm::SchemaNs::Constants::Cascade;
using Orm::SchemaNs::Constants::Restrict;
using Orm::SchemaNs::Grammars::SQLiteSchemaGrammar;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

class tst_SQLite_SchemaBuilder : public QObject // clazy:exclude=ctor-missing-parent-argument
Expand Down Expand Up @@ -132,7 +134,7 @@ void tst_SQLite_SchemaBuilder::initTestCase()

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped
.arg("tst_SQLite_SchemaBuilder", Databases::SQLITE)
.arg(TypeUtils::classPureBasename(*this), Databases::SQLITE)
.toUtf8().constData(), );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ using Orm::Exceptions::InvalidArgumentError;
using Orm::QueryBuilder;
using Orm::Tiny::TinyBuilder;

using TypeUtils = Orm::Utils::Type;

using TestUtils::Databases;

using Models::FilePropertyProperty;
Expand Down Expand Up @@ -93,8 +95,9 @@ void tst_MySql_TinyBuilder::initTestCase()
m_connection = Databases::createConnection(Databases::MYSQL);

if (m_connection.isEmpty())
QSKIP(TestUtils::AutoTestSkipped.arg("tst_MySql_TinyBuilder", Databases::MYSQL)
.toUtf8().constData(), );
QSKIP(TestUtils::AutoTestSkipped
.arg(TypeUtils::classPureBasename(*this), Databases::MYSQL)
.toUtf8().constData(), );
}

void tst_MySql_TinyBuilder::has_Basic_OnHasMany() const
Expand Down

0 comments on commit df92e3a

Please sign in to comment.