Kaydet (Commit) 7007bc31 authored tarafından Noel Grandin's avatar Noel Grandin

cid#1326359 Nesting level does not match indentation

Change-Id: Ic62811bbcb0d1365ee5623943273c834a614b895
üst a5ef59d4
......@@ -283,61 +283,52 @@ public class _XCalendar extends MultiMethodTest {
* Has <b> OK </b> status if the method returns value, that's equal to
* value set before. <p>
*/
public void _setValue() {
boolean res = true;
for (int i=0; i<installed_locales.length; i++) {
for (int i = 0; i < installed_locales.length; i++) {
String error = "";
String lang = "Language: "+installed_locales[i].Language +
", Country: "+ installed_locales[i].Country +
", Variant: "+ installed_locales[i].Variant +
", Name: "+calendars[i][count[i]];
String[] names = new String[]{"DAY_OF_MONTH",
"HOUR","MINUTE","SECOND","MILLISECOND",
"YEAR","MONTH"};
oObj.loadCalendar(calendars[i][count[i]],installed_locales[i]);
short[] fields = new short[]{CalendarFieldIndex.DAY_OF_MONTH,
CalendarFieldIndex.HOUR,
CalendarFieldIndex.MINUTE,
CalendarFieldIndex.SECOND,
CalendarFieldIndex.MILLISECOND,
CalendarFieldIndex.YEAR,
CalendarFieldIndex.MONTH
};
for (int k=0; k<fields.length;k++) {
String lang = "Language: " + installed_locales[i].Language + ", Country: " + installed_locales[i].Country
+ ", Variant: " + installed_locales[i].Variant + ", Name: " + calendars[i][count[i]];
String[] names = new String[] { "DAY_OF_MONTH", "HOUR", "MINUTE", "SECOND", "MILLISECOND", "YEAR",
"MONTH" };
oObj.loadCalendar(calendars[i][count[i]], installed_locales[i]);
short[] fields = new short[] { CalendarFieldIndex.DAY_OF_MONTH, CalendarFieldIndex.HOUR,
CalendarFieldIndex.MINUTE, CalendarFieldIndex.SECOND, CalendarFieldIndex.MILLISECOND,
CalendarFieldIndex.YEAR, CalendarFieldIndex.MONTH };
for (int k = 0; k < fields.length; k++) {
oObj.setDateTime(0.0);
// save the current values for debug purposes
short[] oldValues = new short[fields.length];
for (int n=0; n < oldValues.length; n++){
for (int n = 0; n < oldValues.length; n++) {
oldValues[n] = oObj.getValue(fields[n]);
}
short set = oObj.getValue(fields[k]);
if (fields[k] == CalendarFieldIndex.MONTH) set = newValue;
oObj.setValue(fields[k],set);
if (fields[k] == CalendarFieldIndex.MONTH)
set = newValue;
oObj.setValue(fields[k], set);
short get = oObj.getValue(fields[k]);
if (get != set) {
if (debug)
log.println("ERROR occurred: tried to set " + names[k] + " to value " + set);
log.println("list of values BEFORE set " + names[k] + " to value " + set + ":");
for (int n=0; n < oldValues.length; n++){
for (int n = 0; n < oldValues.length; n++) {
log.println(names[n] + ":" + oldValues[n]);
}
log.println("list of values AFTER set " + names[k] + " to value " + set + ":");
for (int n=0; n < fields.length;n++){
for (int n = 0; n < fields.length; n++) {
log.println(names[n] + ":" + oObj.getValue(fields[n]));
}
error += "failed for "+names[k]+" expected "+
set+" gained "+get+" ; \n";
error += "failed for " + names[k] + " expected " + set + " gained " + get + " ; \n";
}
}
if (error.equals("")) {
log.println(lang + " ... OK");
} else {
log.println("*** "+lang + " ... FAILED ***");
log.println("*** " + lang + " ... FAILED ***");
log.println(error);
}
res &= (error.equals(""));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment