Skip to content

Commit

Permalink
Trade: match test implementation order with run order.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Oct 24, 2021
1 parent 03aeb49 commit 9870cd7
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/Magnum/Trade/Test/AbstractImporterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,19 +596,6 @@ void AbstractImporterTest::setFlags() {
CORRADE_COMPARE(importer._flags, ImporterFlag(4));
}

void AbstractImporterTest::setFlagsNotImplemented() {
struct: AbstractImporter {
ImporterFeatures doFeatures() const override { return {}; }
bool doIsOpened() const override { return false; }
void doClose() override {}
} importer;

CORRADE_COMPARE(importer.flags(), ImporterFlags{});
importer.setFlags(ImporterFlag::Verbose);
CORRADE_COMPARE(importer.flags(), ImporterFlag::Verbose);
/* Should just work, no need to implement the function */
}

void AbstractImporterTest::setFlagsFileOpened() {
#ifdef CORRADE_NO_ASSERT
CORRADE_SKIP("CORRADE_NO_ASSERT defined, can't test assertions");
Expand All @@ -632,6 +619,19 @@ void AbstractImporterTest::setFlagsFileOpened() {
"Trade::AbstractImporter::setFlags(): can't be set while a file is opened\n");
}

void AbstractImporterTest::setFlagsNotImplemented() {
struct: AbstractImporter {
ImporterFeatures doFeatures() const override { return {}; }
bool doIsOpened() const override { return false; }
void doClose() override {}
} importer;

CORRADE_COMPARE(importer.flags(), ImporterFlags{});
importer.setFlags(ImporterFlag::Verbose);
CORRADE_COMPARE(importer.flags(), ImporterFlag::Verbose);
/* Should just work, no need to implement the function */
}

void AbstractImporterTest::openData() {
struct: AbstractImporter {
ImporterFeatures doFeatures() const override { return ImporterFeature::OpenData; }
Expand Down

0 comments on commit 9870cd7

Please sign in to comment.