mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 20:19:17 +08:00
28 lines
736 B
C#
28 lines
736 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using NUnit.Framework;
|
|
using Wox.Core.Updater;
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|