From c8c4d4b7b32f570df8393a7134d4553168d6f14d Mon Sep 17 00:00:00 2001 From: Dayoung Lee Date: Tue, 18 Jul 2023 14:53:51 +0900 Subject: [PATCH] Fix CQM Major defects in Backend (#1607) This commit fixes 4 major defects in modules in Backend directory. It fixes by refering unused objects. ONE-vscode-DCO-1.0-Signed-off-by: Dayoung Lee --- src/Tests/Backend/Compiler.test.ts | 8 +++----- src/Tests/Backend/Executor.test.ts | 8 +++----- src/Tests/Backend/Toolchain.test.ts | 16 ++++++---------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/Tests/Backend/Compiler.test.ts b/src/Tests/Backend/Compiler.test.ts index d3ff99f3..cd2e30f1 100644 --- a/src/Tests/Backend/Compiler.test.ts +++ b/src/Tests/Backend/Compiler.test.ts @@ -20,11 +20,9 @@ import { CompilerBase } from "../../Backend/Compiler"; suite("Backend", function () { suite("CompilerBase", function () { suite("#constructor()", function () { - test("Create dummy compiler", function (pass) { - new CompilerBase(); - - pass(); - assert.ok(true); + test("Create dummy compiler", function () { + const instance = new CompilerBase(); + assert.isTrue(instance instanceof CompilerBase); }); }); diff --git a/src/Tests/Backend/Executor.test.ts b/src/Tests/Backend/Executor.test.ts index bb34eda2..5b839415 100644 --- a/src/Tests/Backend/Executor.test.ts +++ b/src/Tests/Backend/Executor.test.ts @@ -20,11 +20,9 @@ import { ExecutorBase } from "../../Backend/Executor"; suite("Backend", function () { suite("ExecutorBase", function () { suite("#constructor()", function () { - test("Create dummy executor", function (pass) { - new ExecutorBase(); - - pass(); - assert.ok(true); + test("Create dummy executor", function () { + const instance = new ExecutorBase(); + assert.isTrue(instance instanceof ExecutorBase); }); }); diff --git a/src/Tests/Backend/Toolchain.test.ts b/src/Tests/Backend/Toolchain.test.ts index cfa9993f..515c76a7 100644 --- a/src/Tests/Backend/Toolchain.test.ts +++ b/src/Tests/Backend/Toolchain.test.ts @@ -21,11 +21,9 @@ suite("Backend", function () { suite("ToolCommand", function () { const toolchainInfo = new ToolchainInfo("dummy", "dummy toolchain"); suite("#constructor()", function () { - test("Create dummy tool command", function (pass) { - new ToolCommand(toolchainInfo); - - pass(); - assert.ok(true); + test("Create dummy tool command", function () { + const instance = new ToolCommand(toolchainInfo); + assert.isTrue(instance instanceof ToolCommand); }); }); @@ -54,11 +52,9 @@ suite("Backend", function () { const toolchainInfo = new ToolchainInfo("dummy", "dummy toolchain"); suite("#constructor()", function () { - test("Create dummy toolchain", function (pass) { - new Toolchain(toolchainInfo); - - pass(); - assert.ok(true); + test("Create dummy toolchain", function () { + const instance = new Toolchain(toolchainInfo); + assert.isTrue(instance instanceof Toolchain); }); });