Help with C++ unit tests on Replit

How can I do unit tests in C++ on Replit?

1 Like

Check out this repl https://replit.com/@PatrickAtReplit/c-catch2-testing-example

1 Like

In C language is this possible too?

1 Like

Welcome to the community wkanashiro! It’s possible to run unit tests in C too. Here’s a working example using CUnit https://replit.com/@ConnorBrewster/VapidNecessaryProfile. Hope this helps!

2 Likes

Officially, I have seen that unit tests are only supported for python, Java, and NodeJs. Is this support via NIX official (For C and C++)? Can we use it in Teams for Education?

3 Likes

Please make a feature request for CUnit or GTest on Canny. Whichever you prefer!

2 Likes

@patilsandeep I think you mentioned you were able to do this in your Team with nix. Do you mind sharing an example repl for others to use as reference?

1 Like

@LenaAtReplit I used the one shared by @PatrickAtReplit in the previous post. https://replit.com/@ConnorBrewster/VapidNecessaryProfile

Once I complete my curriculum, there will be more to share.

2 Likes

Awesome, can’t wait!

1 Like