public override bool SingleVersionsCompatible(KspVersion gameVersion, CkanModule module) { // Otherwise, check if it's "generally recognise as safe". // If we're running KSP 1.0.4, then allow the mod to run if we would have // considered it compatible under 1.0.3 (as 1.0.4 was "just a hotfix"). if (gameVersion.Equals (KspVersion.Parse ("1.0.4"))) return strict.SingleVersionsCompatible (v103, module); return false; }
public void EqualityWorksCorrectly(KspVersion a, KspVersion b, bool areEqual) { // Act var genericEquality = a.Equals(b); var nonGenericEquality = a.Equals((object)b); var operatorEquality = a == b; var operatorInequality = a != b; var genericReferenceEquality = a.Equals(a); var nonGenericRefereneEquality = a.Equals((object)a); // Assert Assert.AreEqual(areEqual, genericEquality); Assert.AreEqual(areEqual, nonGenericEquality); Assert.AreEqual(areEqual, operatorEquality); Assert.AreNotEqual(areEqual, operatorInequality); Assert.IsTrue(genericReferenceEquality); Assert.IsTrue(nonGenericRefereneEquality); }