Created
February 1, 2013 20:22
-
-
Save mgroves/4693861 to your computer and use it in GitHub Desktop.
TIL about System.Version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class version_test | |
| { | |
| [Test] | |
| public void test1() | |
| { | |
| Assert.That(new Version(1,0), Is.LessThan(new Version(2,0))); | |
| Assert.That(new Version(1,5), Is.LessThan(new Version(2,0))); | |
| Assert.That(new Version(1,int.MaxValue), Is.LessThan(new Version(2,0))); | |
| Assert.That(new Version(2,0), Is.EqualTo(new Version(2,0))); | |
| Assert.That(new Version(2,1), Is.GreaterThan(new Version(2,0))); | |
| Assert.That(new Version(2,5), Is.GreaterThan(new Version(2,0))); | |
| Assert.That(new Version(2,int.MaxValue), Is.GreaterThan(new Version(2,0))); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment