Skip to content

Comments

Add 5 missing TypeScript tests to match C# test suite#29

Merged
jogibear9988 merged 2 commits intomainfrom
copilot/add-missing-tests-typescript
Feb 21, 2026
Merged

Add 5 missing TypeScript tests to match C# test suite#29
jogibear9988 merged 2 commits intomainfrom
copilot/add-missing-tests-typescript

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

The TypeScript test suite had 16 tests while the C# suite had 21. The missing tests covered CTUCall, TPCall, distributor/or combinations, and complex nested or expressions.

Changes

  • New imports: Added CTUCall and TPCall to the test file imports
  • 5 missing tests added in positions matching the C# file structure:
    • TestCallWithCTUAnd + CTUCall with Bool/ConstantInt signals and a Coil output
    • TestCallWithTPAndDistributorTPCall with a Distributor as the Q output
    • DistributorWithOrDistributor branch containing nested Or/And logic
    • MultipleOrCoil with nested Or(And(Or(...), Signal), Signal) structure
    • ComplexOr2 — deeply nested Or(Signal, Or(And(...), And(...))) expression (after ComplexOr)
test('TestCallWithCTU', () => {
    const codeblock = new CodeBlock();
    codeblock.safety = false;
    const nw = new Network('Test2', 'Test2en');
    const f = new And(
        new Signal('aa'),
        new CTUCall('Hallo', new Signal('bbb', SignalType.Bool), new Signal('2', SignalType.ConstantInt), new Coil(new Signal('ccc', SignalType.Bool))),
    );
    nw.add(f);
    codeblock.add(nw);
    const block = new Block('Test', 'blabla', codeblock);
    block.blockInterface = TestInterface;
    const xml = block.getCode();
    expect(xml).toBeTruthy();
});

TypeScript test count now matches C#: 21 tests, all passing.

Original prompt

This section details on the original issue you should resolve

<issue_title>Why are there mor tests in c# then typescript</issue_title>
<issue_description>It seems like there are some tests from c# missing in Typescript.

  • add the missing tests to typescript, add the same places, so the test file looks similar.
  • run the tests in c# and use the output from them to compare with the typescript output</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: jogibear9988 <364896+jogibear9988@users.noreply.github.com>
Copilot AI changed the title [WIP] Add missing tests from C# to TypeScript Add 5 missing TypeScript tests to match C# test suite Feb 21, 2026
Copilot AI requested a review from jogibear9988 February 21, 2026 14:52
@jogibear9988 jogibear9988 marked this pull request as ready for review February 21, 2026 14:55
@jogibear9988 jogibear9988 merged commit 2c0429e into main Feb 21, 2026
1 check passed
@jogibear9988 jogibear9988 deleted the copilot/add-missing-tests-typescript branch February 21, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why are there mor tests in c# then typescript

2 participants