git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1454978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-03-11 02:42:46 +00:00
parent 55d9d0b69e
commit 2d71e8843c
1 changed files with 9 additions and 0 deletions

View File

@ -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));
}
}
} }