Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Remove meaningless assertions #1644

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/Tests/Toolchain/ToolchainEnv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ suite("Toolchain", function () {
assert.fail();
},
() => {
assert.isTrue(true);
// pass
}
);
});
Expand All @@ -163,7 +163,7 @@ suite("Toolchain", function () {
let env = new ToolchainEnv(compiler);
env.prerequisites().then(
() => {
assert.isTrue(true);
// pass
},
() => {
assert.fail();
Expand All @@ -180,7 +180,7 @@ suite("Toolchain", function () {
assert.isAbove(availableToolchains.length, 0);
env.install(availableToolchains[0]).then(
() => {
assert.isTrue(true);
// pass
},
() => {
assert.fail();
Expand All @@ -198,7 +198,7 @@ suite("Toolchain", function () {
assert.fail();
},
() => {
assert.isTrue(true);
// pass
}
);
});
Expand All @@ -211,7 +211,7 @@ suite("Toolchain", function () {
assert.isAbove(installedToolchains.length, 0);
env.uninstall(installedToolchains[0]).then(
() => {
assert.isTrue(true);
// pass
},
() => {
assert.fail();
Expand All @@ -229,7 +229,7 @@ suite("Toolchain", function () {
assert.fail();
},
() => {
assert.isTrue(true);
// pass
}
);
});
Expand All @@ -243,7 +243,7 @@ suite("Toolchain", function () {
const modelCfg = "model.cfg";
env.run(modelCfg, installedToolchains[0]).then(
() => {
assert.isTrue(true);
// pass
},
() => {
assert.fail();
Expand All @@ -261,7 +261,7 @@ suite("Toolchain", function () {
assert.fail();
},
() => {
assert.isTrue(true);
// pass
}
);
});
Expand All @@ -277,7 +277,7 @@ suite("Toolchain", function () {
assert.fail();
},
() => {
assert.isTrue(true);
// pass
}
);
});
Expand All @@ -290,7 +290,7 @@ suite("Toolchain", function () {
assert.isAbove(invalidToolchain.length, 0);
const model = "model.bin";
await env.infer(invalidToolchain[0], model).catch(() => {
assert.isTrue(true);
// pass
});
});
});
Expand All @@ -302,7 +302,7 @@ suite("Toolchain", function () {
assert.isAbove(invalidToolchain.length, 0);
const model = "model.bin";
await env.profile(invalidToolchain[0], model).catch(() => {
assert.isTrue(true);
// pass
});
});
});
Expand All @@ -314,7 +314,7 @@ suite("Toolchain", function () {
assert.isAbove(invalidToolchain.length, 0);
const model = "model.bin";
await env.getModelInfo(invalidToolchain[0], model, "test").catch(() => {
assert.isTrue(true);
// pass
});
});
});
Expand Down
4 changes: 0 additions & 4 deletions src/Tests/Toolchain/ToolchainProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ suite("Toolchain", function () {
const toolchains = toolchainEnv.listAvailable(types[0], 0, 1);
assert.isAbove(toolchains.length, 0);
provider._install(toolchainEnv, toolchains[0]);
assert.isTrue(true);
});
test("requests _install with no installed toolchain", function () {
const provider = new ToolchainProvider();
Expand All @@ -237,7 +236,6 @@ suite("Toolchain", function () {
const toolchains = invalidToolchainEnv.listAvailable(types[0], 0, 1);
assert.isAbove(toolchains.length, 0);
provider._install(invalidToolchainEnv, toolchains[0]);
assert.isTrue(true);
});
test("NEG: requests _install with multiple installed toolchains", function () {
const provider = new ToolchainProvider();
Expand All @@ -262,7 +260,6 @@ suite("Toolchain", function () {
const tnodes = NodeBuilder.createToolchainNodes(bnodes[1]);
assert.isAbove(tnodes.length, 0);
provider.uninstall(tnodes[0]);
assert.isTrue(true);
});
test("NEG: requests uninstall with invalid toolchain node", function () {
const provider = new ToolchainProvider();
Expand Down Expand Up @@ -291,7 +288,6 @@ suite("Toolchain", function () {
assert.isAbove(toolchains.length, 0);
DefaultToolchain.getInstance().set(toolchainEnv, toolchains[0]);
provider._run(modelCfg);
assert.isTrue(true);
});
test("NEG: requests run with uninitialized default toolchain", function () {
const provider = new ToolchainProvider();
Expand Down
2 changes: 0 additions & 2 deletions src/Tests/Utils/PipedSpawnSync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ suite("Utils", function () {
assert.fail("should not reach here");
} catch (err) {
// success
assert.isTrue(true);
}
});
});
Expand Down Expand Up @@ -143,7 +142,6 @@ suite("Utils", function () {
assert.fail("should not reach here");
} catch (err) {
// success
assert.isTrue(true);
}
});
});
Expand Down