Changeset 4266a10


Ignore:
Timestamp:
Nov 26, 2012 12:29:02 AM (7 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
4902b4e
Parents:
31fc55e
Message:

Added more tests to VersionComparatorSpec? to further cover the implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/test/scalatest/net/i2p/util/VersionComparatorSpec.scala

    r31fc55e r4266a10  
    1717            vc.compare("0.1.3", "0.1.2") should equal (1)
    1818        }
     19        it("should find that 0.1.2.3.4 is greater than 0.1.2") {
     20            vc.compare("0.1.2.3.4", "0.1.2") should equal (1)
     21        }
     22        it("should find that 0.1.2 is less than 0.1.2.3.4") {
     23            vc.compare("0.1.2", "0.1.2.3.4") should equal (-1)
     24        }
     25        it("should find that 0.1.3 is greater than 0.1.2.3.4") {
     26            vc.compare("0.1.3", "0.1.2.3.4") should equal (1)
     27        }
    1928        it("should find that 0.1.2 is equal to 0-1-2") {
    2029            vc.compare("0.1.2", "0-1-2") should equal (0)
     
    2635            vc.compare("0.1.2-foo", "0.1.2-bar") should equal (0)
    2736        }
     37        it("should find that -0.1.2 is less than -0.1.3") {
     38            vc.compare("-0.1.2", "-0.1.3") should equal (-1)
     39        }
     40        it("should find that 0..2 is greater than 0.1.2") {
     41            vc.compare("0..2", "0.1.2") should equal (1)
     42        }
     43        it("should find that 0.1.2 is less than 0..2") {
     44            vc.compare("0.1.2", "0..2") should equal (-1)
     45        }
    2846    }
    2947}
Note: See TracChangeset for help on using the changeset viewer.