Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 25 15:47
    rhard commented #353
  • Nov 25 11:02

    krzysztof-jusiak on master

    [cppcon-2021] (compare)

  • Nov 23 06:33
    dfontenot opened #531
  • Nov 16 18:32
    englercj commented #518
  • Nov 16 11:28
    jevansio commented #518
  • Nov 16 11:22
    jevansio commented #518
  • Nov 16 10:02
    jevansio commented #518
  • Nov 16 00:03
    englercj commented #518
  • Nov 16 00:02
    englercj commented #518
  • Nov 16 00:02
    englercj commented #518
  • Nov 16 00:02
    englercj commented #518
  • Nov 16 00:02
    englercj commented #518
  • Nov 16 00:01
    englercj commented #518
  • Nov 15 12:53
    jevansio commented #518
  • Nov 15 12:28
    jevansio commented #518
  • Nov 15 12:23
    jevansio commented #518
  • Nov 15 12:22
    jevansio commented #518
  • Nov 15 12:09
    jevansio commented #518
  • Nov 14 22:34
    cmorganBE opened #480
  • Nov 14 19:55
    cmorganBE commented #479
Clare Macrae
@claremacrae
Hi, In order to add a test for this PR, I'm working on understanding the existing tests in ut.cpp....
boost-experimental/ut#300

How do I make the tests there print out the failing values?
For example, when I change this:

    test_assert(1 == reporter.tests_.pass);
-    test_assert(0 == reporter.tests_.fail);
+    test_assert(42_i == reporter.tests_.fail);
    test_assert(0 == reporter.tests_.skip);

I get this output:

/Users/clare/Documents/develop/Testing/ut-claremacrae/cmake-build-spaces/cmake-build-debug-gcc9-brew/test/ut/ut
/Users/clare/Documents/develop/Testing/ut-claremacrae/test/ut/ut.cpp:393:FAILED

Process finished with exit code 6
I would like it to print out something like 42 != 0
Kris Jusiak
@krzysztof-jusiak

Right, that's a bit of tricky how to test a unit test framework without a unit test framework?

  • One way would be to use UT expect instead of test_assert which is just a poor's man assert, but that would be using testing code to test code, not ideal;
  • Another way would be just to do `std::cerr << reporter.tests_.fail, not great too;
  • Use alternative UT framework for verification, hmm
  • Implement a better test_assert which acts more like expect but that would require tests around it as well
  • Use a debugger to get values on failure with catch throw
  • ...

Not sure what's the best solution here; for me, small changes and line where it failed is usually enough to deal with it but I don't like the experience, that's why [Boost].UT came about in the first place!

Kunal Tyagi
@kunaltyagi
Is UT on conan? I see a conanfile, but no packages match the pattern 'UT'
Kris Jusiak
@krzysztof-jusiak
I don't think so :point_up: not yet
Kris Jusiak
@krzysztof-jusiak