Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Test Your CodeNew to Visual Studio Code? Get it now.
Test Your Code

Test Your Code

Joonsimjoon

|
2 installs
| (0) | Free
Automatically finds counterexamples by comparing your test code with the correct implementation using your input generator.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Test Your Code

VSCode extension to test your algorithm implementations.
Provide the following in a folder:

  • good.cpp: the correct implementation
  • test.cpp: your test solution
  • input_generator.ts: generates randomized test input

This extension will:

  1. Compile all three files.
  2. Generate input via input_generator.cpp.
  3. Run both good.cpp and test.cpp on the same input.
  4. Compare outputs and report mismatches as counterexamples.

Usage

  • Open a folder with all three C++ files
  • Run the command:

    Test Your Code: Generate Counterexample

  • If a mismatch is found, the input will be shown in the output console.

Requirements

  • You must have g++ available in your system PATH

Release Note

  • v1.1.1 Change input_generator.cpp to input_generator.ts
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft