Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17756 first cut at test for missing examples #3835

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ public void TestShowRowAction() {

for (String locale : localesForRowAction) {
DummyPathValueInfo dummyPathValueInfo = new DummyPathValueInfo();
dummyPathValueInfo.locale = CLDRLocale.getInstance(locale);
dummyPathValueInfo.setLocale(CLDRLocale.getInstance(locale));
CLDRFile cldrFile = testInfo.getCldrFactory().make(locale, true);
CLDRFile cldrFileUnresolved = testInfo.getCldrFactory().make(locale, false);

Expand All @@ -1107,8 +1107,9 @@ public void TestShowRowAction() {
for (PathHeader ph : sorted) {
String path = ph.getOriginalPath();
SurveyToolStatus surveyToolStatus = ph.getSurveyToolStatus();
dummyPathValueInfo.xpath = path;
dummyPathValueInfo.baselineValue = cldrFileUnresolved.getStringValue(path);
dummyPathValueInfo.setXpath(path);
dummyPathValueInfo.setBaselineValue(
cldrFileUnresolved.getStringValue(path));
StatusAction action =
phase.getShowRowAction(
dummyPathValueInfo, InputMethod.DIRECT, ph, dummyUserInfo);
Expand All @@ -1126,7 +1127,7 @@ public void TestShowRowAction() {
"vo ==> FORBID_READONLY",
StatusAction.FORBID_READONLY,
action);
} else if (dummyPathValueInfo.baselineValue == null) {
} else if (dummyPathValueInfo.getBaselineValue() == null) {
if (!assertEquals(
"missing ==> ALLOW", StatusAction.ALLOW, action)) {
warnln("\t\t" + locale + "\t" + ph);
Expand All @@ -1150,7 +1151,9 @@ public void TestShowRowAction() {
}
actionToExamplePath.put(
key,
Pair.of(dummyPathValueInfo.baselineValue != null, path));
Pair.of(
dummyPathValueInfo.getBaselineValue() != null,
path));
}
}
}
Expand Down Expand Up @@ -1210,7 +1213,7 @@ public VoterInfo getVoterInfo() {
}
};

private static class DummyPathValueInfo implements PathValueInfo {
public static class DummyPathValueInfo implements PathValueInfo {
private CLDRLocale locale;
private String xpath;
private String baselineValue;
Expand Down Expand Up @@ -1271,6 +1274,18 @@ public CLDRLocale getLocale() {
public String getXpath() {
return xpath;
}

public void setLocale(CLDRLocale locale) {
this.locale = locale;
}

public void setXpath(String xpath) {
this.xpath = xpath;
}

public void setBaselineValue(String baselineValue) {
this.baselineValue = baselineValue;
}
}

final Set<String> cldrLocales =
Expand Down
Loading
Loading