[gjs] testCoverage: Avoid JS warning for a mistyped semicolon
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] testCoverage: Avoid JS warning for a mistyped semicolon
- Date: Mon, 3 Feb 2014 22:00:08 +0000 (UTC)
commit 4ee212603433969a858890e7c4c073cef3ada7a0
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Feb 3 16:59:47 2014 -0500
testCoverage: Avoid JS warning for a mistyped semicolon
We're intentionally trying to test empty consequents, so just
use some blocks instead of a blank statement here.
installed-tests/js/testCoverage.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/installed-tests/js/testCoverage.js b/installed-tests/js/testCoverage.js
index 81a5fb7..ab1bcd3 100644
--- a/installed-tests/js/testCoverage.js
+++ b/installed-tests/js/testCoverage.js
@@ -394,7 +394,7 @@ function testSimpleTwoExitBranchWithoutBlocks() {
function testNoBranchFoundIfConsequentWasEmpty() {
let foundBranches =
parseScriptForBranches("let a, b;\n" +
- "if (1);\n");
+ "if (1) {}\n");
assertArrayEquals(foundBranches,
[],
branchInfoEqual);
@@ -403,7 +403,7 @@ function testNoBranchFoundIfConsequentWasEmpty() {
function testSingleExitFoundIfOnlyAlternateExitDefined() {
let foundBranchesForOnlyAlternateDefinition =
parseScriptForBranches("let a, b;\n" +
- "if (1);\n" +
+ "if (1) {}\n" +
"else\n" +
" a++;\n");
assertArrayEquals(foundBranchesForOnlyAlternateDefinition,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]