|
@@ -81,10 +81,16 @@ export class OutputMatching {
|
|
|
|
|
|
outputMatch (g_output, e_output) {
|
|
|
if(OutputMatching.NUM_REGEX.test(e_output)) {
|
|
|
+ if(!OutputMatching.NUM_REGEX.test(g_output)) {
|
|
|
+ return OutputResult.createNumberResult(e_output, g_output, 0);
|
|
|
+ }
|
|
|
const g_num = new Decimal(g_output);
|
|
|
const e_num = new Decimal(e_output);
|
|
|
return this.checkNumbers(g_num, e_num);
|
|
|
} else if (OutputMatching.BOOLEAN_REGEX.test(e_output)) {
|
|
|
+ if (!OutputMatching.BOOLEAN_REGEX.test(g_output)) {
|
|
|
+ return OutputResult.createBoolResult(e_output, g_output, 0);
|
|
|
+ }
|
|
|
const g_bool = TypeParser.toBool(g_output);
|
|
|
const e_bool = TypeParser.toBool(e_output);
|
|
|
return this.checkBoolean(g_bool, e_bool);
|