Skip to content

Commit

Permalink
Dart web: remove extraneous debug output (unicode-org#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-oly authored Jan 14, 2025
1 parent 43965ba commit 8442f7c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions executors/dart_web/out/executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ let doLogOutput = 0;

// Test type support. Add new items as they are implemented
const testTypes = {
TestCollShift: Symbol("coll_shift"),
TestCollation: Symbol("collation"),
TestDecimalFormat: Symbol("decimal_fmt"),
TestNumberFormat: Symbol("number_fmt"),
Expand All @@ -57,7 +56,6 @@ const testTypes = {
}

const supported_test_types = [
Symbol("coll_shift"),
Symbol("collation"),
Symbol("decimal_fmt"),
Symbol("number_fmt"),
Expand All @@ -67,7 +65,6 @@ const supported_test_types = [
const supported_tests_json = {
"supported_tests":
[
"coll_shift",
"collation",
"decimal_fmt",
"number_fmt",
Expand All @@ -94,10 +91,7 @@ let rl = readline.createInterface({
function parseJsonForTestId(parsed) {
let testId = parsed["test_type"];

if (testId == "coll_shift") {
return testTypes.TestCollShift;
}
if (testId == "coll_shift") {
if (testId == "collation") {
return testTypes.TestCollation;
}
if (testId == "decimal_fmt" || testId == "number_fmt") {
Expand Down Expand Up @@ -159,15 +153,15 @@ rl.on('line', function (line) {
parsedJson = JSON.parse(line);
} catch (error) {
outputLine = {
'Cannot parse input line': error,
'error': 'Cannot parse input line',
'input_line': line,
"testId": testId
};

// Send result to stdout for verification
jsonOut = JSON.stringify(outputLine);
if (doLogOutput > 0) {
console.log("## ERROR " + lineId + ' ' + outputLine + ' !!!!!');
console.log("## ERROR JSON.parse: " + lineId + ' ' + outputLine + ' !!!!!');
}
process.stdout.write(jsonOut);
}
Expand All @@ -194,8 +188,8 @@ rl.on('line', function (line) {
};
}

if ('error' in outputLine) {
// To get the attention of the driver
if (doLogOutput > 0 && 'error' in outputLine) {
// To get the attention of the driver
console.log("#!! ERROR in DART_WEB: " + test_type + ": " + JSON.stringify(outputLine));
}

Expand Down

0 comments on commit 8442f7c

Please sign in to comment.