Add test cases for version
This commit is contained in:
@@ -53,16 +53,16 @@ namespace OpenVulkano
|
||||
//endregion
|
||||
|
||||
//region Comparison operators
|
||||
[[nodiscard]] bool operator ==(const Version& rhs) { return Compare(rhs) == 0; }
|
||||
[[nodiscard]] bool operator !=(const Version& rhs) { return Compare(rhs); }
|
||||
[[nodiscard]] bool operator < (const Version& rhs) { return Compare(rhs) < 0; }
|
||||
[[nodiscard]] bool operator <=(const Version& rhs) { return Compare(rhs) < 1; }
|
||||
[[nodiscard]] bool operator > (const Version& rhs) { return Compare(rhs) > 0; }
|
||||
[[nodiscard]] bool operator >=(const Version& rhs) { return Compare(rhs) > -1; }
|
||||
[[nodiscard]] bool operator ==(const Version& rhs) const { return Compare(rhs) == 0; }
|
||||
[[nodiscard]] bool operator !=(const Version& rhs) const { return Compare(rhs); }
|
||||
[[nodiscard]] bool operator < (const Version& rhs) const { return Compare(rhs) < 0; }
|
||||
[[nodiscard]] bool operator <=(const Version& rhs) const { return Compare(rhs) < 1; }
|
||||
[[nodiscard]] bool operator > (const Version& rhs) const { return Compare(rhs) > 0; }
|
||||
[[nodiscard]] bool operator >=(const Version& rhs) const { return Compare(rhs) > -1; }
|
||||
//endregion
|
||||
|
||||
private:
|
||||
[[nodiscard]] int Compare(const Version& other);
|
||||
[[nodiscard]] int Compare(const Version& other) const;
|
||||
[[nodiscard]] int CompareBuildNr(const Version& other) const;
|
||||
[[nodiscard]] int CompareTimestamp(const Version& other) const;
|
||||
[[nodiscard]] int CompareComponents(const Version& other) const;
|
||||
|
||||
Reference in New Issue
Block a user