|
@@ -10,6 +10,7 @@ import { Config } from "../util/config";
|
|
|
|
|
|
|
|
|
const LocalizedStrings = LocalizedStringsService.getInstance();
|
|
|
+const list_joiner = LocalizedStrings.getUI("text_join_assessment_outputs");
|
|
|
|
|
|
const StringTypes = line_i18n.StringTypes;
|
|
|
|
|
@@ -33,7 +34,7 @@ export class IVProgAssessment {
|
|
|
return testResult.then(function (total) {
|
|
|
const grade = total / outerRef.testCases.length;
|
|
|
const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;
|
|
|
- outerRef.writeToConsole(channel, StringTypes.MESSAGE, "test_suite_grade", grade * 100);
|
|
|
+ outerRef.writeToConsole(channel, StringTypes.MESSAGE, "test_suite_grade", (grade * 100).toFixed(2));
|
|
|
return Promise.resolve(grade)
|
|
|
}).catch(err => {
|
|
|
outerRef.domConsole.err("Erro inesperado durante o cálculo da nota.");// try and show error messages through domconsole
|
|
@@ -59,10 +60,10 @@ export class IVProgAssessment {
|
|
|
if (input.inputList.length !== input.index) {
|
|
|
outerThis.showErrorMessage('test_case_few_reads', name+1);
|
|
|
outerThis.showInfoMessage('test_case_duration', millis);
|
|
|
- return Promise.resolve(accumulator + (input.index/inputList.length));
|
|
|
+ return Promise.resolve(accumulator);
|
|
|
} else if (output.list.length != expectedOutputs.length) {
|
|
|
- outerThis.showErrorMessage('test_case_failed', name + 1, inputList.join(','),
|
|
|
- expectedOutputs.join(','), output.list.join(','));
|
|
|
+ outerThis.showErrorMessage('test_case_failed', name + 1, inputList.join(list_joiner),
|
|
|
+ expectedOutputs.join(list_joiner), output.list.join(list_joiner));
|
|
|
outerThis.showInfoMessage('test_case_duration', millis);
|
|
|
// must check for a partial match of the generated output
|
|
|
const numMatchedOutputs = output.list.reduce((acc, actualOutput, index) => {
|
|
@@ -77,9 +78,8 @@ export class IVProgAssessment {
|
|
|
} else {
|
|
|
const isOk = outerThis.checkOutputLists(output.list, expectedOutputs);
|
|
|
if(!isOk) {
|
|
|
- console.log("not ok.");
|
|
|
- outerThis.showErrorMessage('test_case_failed', name + 1, inputList.join(','),
|
|
|
- expectedOutputs.join(','), output.list.join(','));
|
|
|
+ outerThis.showErrorMessage('test_case_failed', name + 1, inputList.join(list_joiner),
|
|
|
+ expectedOutputs.join(list_joiner), output.list.join(list_joiner));
|
|
|
outerThis.showInfoMessage('test_case_duration', millis);
|
|
|
return Promise.resolve(accumulator);
|
|
|
} else {
|