Skip to content

Commit

Permalink
fix std::bad_function in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Sep 28, 2023
1 parent a6d91dd commit 4e5dbcb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/test/testactiveproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ void TestActiveProject::testProjectValidations()

QCOMPARE( spyErrorsFound.count(), 1 );
QCOMPARE( spyReportIssues.count(), 3 ); // invalid project CRS, invalid layer CRS, missing layer Survey

const QString id = mApi->localProjectsManager().projectId( projectDir + "/" + projectFilename );
mApi->localProjectsManager().removeLocalProject( id );
}

void TestActiveProject::testProjectLoadFailure()
Expand All @@ -71,6 +74,9 @@ void TestActiveProject::testProjectLoadFailure()
QVERIFY( !activeProject.load( projectdir + "/" + projectfilename ) );
QVERIFY( !activeProject.localProject().isValid() );
QVERIFY( spy.count() );

const QString id = mApi->localProjectsManager().projectId( projectdir + "/" + projectdir );
mApi->localProjectsManager().removeLocalProject( id );
}

void TestActiveProject::testPositionTrackingFlag()
Expand All @@ -97,6 +103,9 @@ void TestActiveProject::testPositionTrackingFlag()
QCOMPARE( spy.count(), 1 );
QCOMPARE( activeProject.positionTrackingSupported(), false );

QString id = mApi->localProjectsManager().projectId( projectDir + "/" + projectName );
mApi->localProjectsManager().removeLocalProject( id );

// project "tracking" - tracking enabled
projectDir = TestUtils::testDataDir() + "/tracking/";
projectName = "tracking-project.qgz";
Expand All @@ -107,4 +116,7 @@ void TestActiveProject::testPositionTrackingFlag()

QCOMPARE( spy.count(), 2 );
QCOMPARE( activeProject.positionTrackingSupported(), true );

id = mApi->localProjectsManager().projectId( projectDir + "/" + projectName );
mApi->localProjectsManager().removeLocalProject( id );
}

1 comment on commit 4e5dbcb

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.09.459811 just submitted!

Please sign in to comment.