Help with C++ unit tests on Replit

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

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

In C language is this possible too?

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!

1 Like

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?

1 Like

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

1 Like

@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?

@lena 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.

1 Like

Awesome, can’t wait!