fix UnitTest
This commit is contained in:
@@ -141,7 +141,7 @@ namespace Shadowsocks.Controller
|
||||
asserts.Sort(new VersionComparer());
|
||||
}
|
||||
|
||||
class Asset
|
||||
public class Asset
|
||||
{
|
||||
public bool prerelease;
|
||||
public string name;
|
||||
|
||||
+7
-7
@@ -13,13 +13,13 @@ namespace test
|
||||
[TestMethod]
|
||||
public void TestCompareVersion()
|
||||
{
|
||||
Assert.IsTrue(UpdateChecker.CompareVersion("2.3.1.0", "2.3.1") == 0);
|
||||
Assert.IsTrue(UpdateChecker.CompareVersion("1.2", "1.3") < 0);
|
||||
Assert.IsTrue(UpdateChecker.CompareVersion("1.3", "1.2") > 0);
|
||||
Assert.IsTrue(UpdateChecker.CompareVersion("1.3", "1.3") == 0);
|
||||
Assert.IsTrue(UpdateChecker.CompareVersion("1.2.1", "1.2") > 0);
|
||||
Assert.IsTrue(UpdateChecker.CompareVersion("2.3.1", "2.4") < 0);
|
||||
Assert.IsTrue(UpdateChecker.CompareVersion("1.3.2", "1.3.1") > 0);
|
||||
Assert.IsTrue(UpdateChecker.Asset.CompareVersion("2.3.1.0", "2.3.1") == 0);
|
||||
Assert.IsTrue(UpdateChecker.Asset.CompareVersion("1.2", "1.3") < 0);
|
||||
Assert.IsTrue(UpdateChecker.Asset.CompareVersion("1.3", "1.2") > 0);
|
||||
Assert.IsTrue(UpdateChecker.Asset.CompareVersion("1.3", "1.3") == 0);
|
||||
Assert.IsTrue(UpdateChecker.Asset.CompareVersion("1.2.1", "1.2") > 0);
|
||||
Assert.IsTrue(UpdateChecker.Asset.CompareVersion("2.3.1", "2.4") < 0);
|
||||
Assert.IsTrue(UpdateChecker.Asset.CompareVersion("1.3.2", "1.3.1") > 0);
|
||||
}
|
||||
|
||||
private void RunEncryptionRound(IEncryptor encryptor, IEncryptor decryptor)
|
||||
|
||||
Reference in New Issue
Block a user