Skip to content

Commit

Permalink
Details.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Jun 16, 2024
1 parent 65965ef commit 8239e84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import javax.annotation.processing.Generated;


/**
Expand All @@ -15,6 +16,7 @@
*
*/
@SuppressWarnings("ALL")
@Generated("org.meeuw.i18n.languages.test.GenerateEnumsTest")
public enum LanguageFamilyCode
implements ISO_639_Code
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.sun.codemodel.writer.FileCodeWriter;


@SuppressWarnings("DataFlowIssue")
public class GenerateEnumsTest {
String path = "src/main/java";
File file = new File(path);
Expand Down Expand Up @@ -87,7 +88,7 @@ public void create639_1() throws JClassAlreadyExistsException, IOException {
model.build(new FileCodeWriter(new File(absolutePath), false));
}
@Test
public void create639_5() throws JClassAlreadyExistsException, IOException, ClassNotFoundException {
public void create639_5() throws JClassAlreadyExistsException, IOException {

JCodeModel model = new JCodeModel();
JDefinedClass iso639_5 = model._class("org.meeuw.i18n.languages.LanguageFamilyCode", ClassType.ENUM);
Expand All @@ -98,6 +99,9 @@ public void create639_5() throws JClassAlreadyExistsException, IOException, Clas
.append("An enum with all ISO-639-5 language family codes.\n<p>\n")
.append("This enum is automatically generated by " + GenerateEnumsTest.class + " from a tab separated file found on id.loc.gov.");

iso639_5.annotate(Generated.class).param("value", GenerateEnumsTest.class.getName());


JFieldVar uri = iso639_5.field(JMod.PRIVATE | JMod.FINAL, URI.class, "uri");


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public void getTokiPona() {
public void getByPart1() {
assertThat(ISO_639.getByPart1("nl").get().refName()).isEqualTo("Dutch");
assertThat(ISO_639.getByPart1(null)).isEmpty();

}

@Test
public void getByPart2T() {
assertThat(ISO_639.getByPart2T("nld").get().refName()).isEqualTo("Dutch");
Expand Down Expand Up @@ -143,7 +143,6 @@ public void krm() {
assertThat(ISO_639.getByPart3("krm").get().code()).isEqualTo("bmf");
}


@Test
public void ppr() {
assertThat(ISO_639.getByPart3("ppr").get().code()).isEqualTo("lcq");
Expand All @@ -165,8 +164,6 @@ public void XX() {
} finally {
LanguageCode.resetFallBacks();
}

}


}

0 comments on commit 8239e84

Please sign in to comment.