2015-10-31 07:17:34 +08:00
|
|
|
|
using NUnit.Framework;
|
2015-01-27 21:51:29 +08:00
|
|
|
|
using Wox.Core.Updater;
|
2015-01-11 21:52:30 +08:00
|
|
|
|
|
|
|
|
|
namespace Wox.Test
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class SemanticVersionTest
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void CompareTest()
|
|
|
|
|
{
|
|
|
|
|
SemanticVersion v1 = new SemanticVersion(1, 1, 0);
|
|
|
|
|
SemanticVersion v2 = new SemanticVersion(1, 2, 0);
|
|
|
|
|
SemanticVersion v3 = new SemanticVersion(1, 1, 0);
|
|
|
|
|
SemanticVersion v4 = new SemanticVersion("1.1.0");
|
|
|
|
|
Assert.IsTrue(v1 < v2);
|
|
|
|
|
Assert.IsTrue(v2 > v1);
|
|
|
|
|
Assert.IsTrue(v1 == v3);
|
|
|
|
|
Assert.IsTrue(v1.Equals(v3));
|
|
|
|
|
Assert.IsTrue(v1 == v4);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|