ProjectVersion tests, fix mixleading comment
This commit is contained in:
@@ -111,7 +111,7 @@ int ProjectVersion::compare(const ProjectVersion & a, const ProjectVersion & b,
|
||||
return 0;
|
||||
}
|
||||
|
||||
// make sure 0.x.y > 0.x.y-patch
|
||||
// make sure 0.x.y > 0.x.y-alpha
|
||||
if(a.getBuild().isEmpty())
|
||||
{
|
||||
return 1;
|
||||
@@ -121,6 +121,7 @@ int ProjectVersion::compare(const ProjectVersion & a, const ProjectVersion & b,
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 0.x.y-beta > 0.x.y-alpha
|
||||
return QString::compare(a.getBuild(), b.getBuild());
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ private slots:
|
||||
QVERIFY(ProjectVersion("1.1.0", CompareType::Minor) == "1.1.5");
|
||||
QVERIFY( ! ( ProjectVersion("3.1.0", CompareType::Minor) < "2.2.5" ) );
|
||||
QVERIFY( ! ( ProjectVersion("2.5.0", CompareType::Release) < "2.2.5" ) );
|
||||
QVERIFY(ProjectVersion("1.1.0") > "1.1.0-alpha");
|
||||
QVERIFY(ProjectVersion("1.1.0-alpha") < "1.1.0-beta");
|
||||
}
|
||||
} ProjectVersionTests;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user