1

I'm making an attempt at setting boost's unit test framework up for myself, but due to having to use C++98, I also have to use boost 1.45. Due to this, I find I can't make use of datasets the way I'd like (have test cases that have an arity of 2 and a dataset of pairs (input_val,expected_val)). It's looking like I'll be able to get an approximation going using a global fixture (The fixtures would have to be global if I want to not have it reset every test case. This issue is documented in another post), but I dislike the idea of throwing all that into global. Does anybody know a better, possibly more elegant solution?

PBandJ
  • 21
  • 5
  • 1
    For C++98, I'd use [Catch](https://github.com/menzi11/Catch) for unit testing. (Catch2 is for C++14 and later.) – Eljay Dec 31 '21 at 00:54
  • Catch is beautiful and perfect for what I need. Their approach to my issue is clever and intuitive. I appreciate the quick response! – PBandJ Dec 31 '21 at 01:18
  • I used Catch for many years. At work, we're using C++14, we use Boost Test and Google Test (for different parts of the system, by different teams). I've used Catch2 (C++14 and later), but I like [doctest](https://github.com/doctest/doctest) even better and is what I'm currently using at home for my C++17 projects. – Eljay Dec 31 '21 at 01:42

1 Answers1

1

@ provided the info I needed. If anybody else is looking for a good unit testing framework for C++98, Catch seems great so far!

PBandJ
  • 21
  • 5