package com.fasterxml.jackson.core.util;

import com.fasterxml.jackson.core.Version;

public class TestVersionUtil extends com.fasterxml.jackson.test.BaseTest
{
    public void testVersionPartParsing()
    {
        assertEquals(13, VersionUtil.parseVersionPart("13"));
        assertEquals(27, VersionUtil.parseVersionPart("27.8"));
        assertEquals(0, VersionUtil.parseVersionPart("-3"));
    }

    public void testVersionParsing()
    {
        assertEquals(new Version(1, 2, 15, "foo", "group", "artifact"),
                VersionUtil.parseVersion("1.2.15-foo", "group", "artifact"));
    }

    public void testMavenVersionParsing() {
        assertEquals(new Version(1, 2, 3, "SNAPSHOT", "foo.bar", "foo-bar"),
                VersionUtil.mavenVersionFor(TestVersionUtil.class.getClassLoader(), "foo.bar", "foo-bar"));
    }
}

@@ -77,16 +77,123 @@
 Version;
+%0Aimport com.fasterxml.jackson.core.json.CoreVersion;%0Aimport com.fasterxml.jackson.core.json.PackageVersion;
 %0A%0Apublic
@@ -936,11 +936,142 @@
 );%0A    %7D
+%0A%0A    public void testPackageVersionMatches() %7B%0A        assertEquals(PackageVersion.VERSION, CoreVersion.instance.version());%0A    %7D
 %0A%7D%0A

Add another unit test.