mirror of https://github.com/apache/lucene.git
add test
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1454978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
55d9d0b69e
commit
2d71e8843c
|
@ -32,4 +32,13 @@ public class TestVersion extends LuceneTestCase {
|
||||||
assertEquals(Version.LUCENE_40, Version.parseLeniently("LUCENE_40"));
|
assertEquals(Version.LUCENE_40, Version.parseLeniently("LUCENE_40"));
|
||||||
assertEquals(Version.LUCENE_CURRENT, Version.parseLeniently("LUCENE_CURRENT"));
|
assertEquals(Version.LUCENE_CURRENT, Version.parseLeniently("LUCENE_CURRENT"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testDeprecations() throws Exception {
|
||||||
|
Version values[] = Version.values();
|
||||||
|
// all but the latest version should be deprecated
|
||||||
|
for (int i = 0; i < values.length-2; i++) {
|
||||||
|
assertTrue(values[i].name() + " should be deprecated",
|
||||||
|
Version.class.getField(values[i].name()).isAnnotationPresent(Deprecated.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue