Skip to content

Follow-up to PR #13: remove auto declaration injection from test setup and rely on include-style test harness #14

@NickK21

Description

@NickK21

Summary

PR #13 fixed duplicate-linking for include-style C++ tests (runner.cpp + program.cpp), but C++ test setup still auto-injects regex-generated declarations into test_program.h. That injection can generate incorrect signatures (example: unsigned int reduced to int) and cause compile errors unrelated to student correctness.

Current behavior

In executor.js:

  • extractFunctionDeclarations() parses student code with regex.
  • handleTestSetup() prepends generated declarations to testCode.
  • test_program.h becomes declarations + testCode.

This can introduce conflicts even when testCode correctly uses include-style harness logic.

Desired behavior

This issue is a follow-up to PR #13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions