Skip to content

Commit 5cceddf

Browse files
committed
fix: update complexity assertion in CSharp Analyzer test for logical operators
Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
1 parent b313816 commit 5cceddf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/unit/unit.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ describe("Core Logic Unit Tests (Node.js)", () => {
6868
const results = analyzer.analyzeFunctions(sourceCode);
6969

7070
assert.strictEqual(results.length, 1);
71-
assert.strictEqual(results[0].complexity, 4); // 2 ifs + 1 && + 1 ||
71+
// 2 ifs (+1 each) + '&&' (+2 at nest 1) + '||' (+2 at nest 1) = 6
72+
assert.strictEqual(results[0].complexity, 6);
7273
});
7374

7475
it("should handle loops correctly", () => {

0 commit comments

Comments
 (0)