Giter VIP home page Giter VIP logo

Comments (11)

claremacrae avatar claremacrae commented on July 22, 2024

Hi, I happen to be one of the maintainers of ApprovalTests.cpp... Am happy to try and help with this, or answer questions, if I can...

from ut.

claremacrae avatar claremacrae commented on July 22, 2024

Oh, and thank you for trying to make this integration!

from ut.

lp55 avatar lp55 commented on July 22, 2024

Hi @claremacrae,

It would be great if you could check things on the ApprovalTests.cpp side. As I said I don't think it's an issue there, but I haven't had time to do a in depth debug.
And thanks for ApprovalTests.cpp! It's a very cool idea and it really fills a need I have in my current project. I have a small patch for TortoiseGitMerge tool support that I'll submit soon.

from ut.

claremacrae avatar claremacrae commented on July 22, 2024

Hi @lp55

You're welcome...

I can reproduce the behaviour you describe, but I can't get a debugger to break in the ApprovalTests code to work out what's going on. It's almost as though it's all being executed at compile time???

from ut.

claremacrae avatar claremacrae commented on July 22, 2024

Are you available to screens-share and pair on this?

from ut.

lp55 avatar lp55 commented on July 22, 2024

Hi @claremacrae

I'm available for screen-share depending on the tool. What do you use?

from ut.

claremacrae avatar claremacrae commented on July 22, 2024

Great - How about you email me to [email protected] and we take it from there?

from ut.

claremacrae avatar claremacrae commented on July 22, 2024

We were able to get this working - the key turned out to be that we needed the code that handled ut::events::test_begin to have access to the filename the test was in... which we were able to get by changing the test_begin method to this:

                auto on(ut::events::test_begin test_begin) -> void {
                    const std::string fileName =
                            ut::reflection::source_location::current().file_name();
                    currentTest.setFileName(fileName);

                    std::string name = test_begin.name;
                    currentTest.sections.emplace_back(name);

                    ApprovalTestNamer::currentTest(&currentTest);

                    ut::reporter<ut::printer>::on(test_begin);
                }

from ut.

claremacrae avatar claremacrae commented on July 22, 2024

In case anyone else wants to look at this in the short term, I've attached a slightly-modified version of what we ended up with - renamed to .txt so I could upload it here.

approvals.txt

@lp55 had kindly offered to work it up to something to add to ApprovalTests.cpp, so that it supports ut directly - thank you!

from ut.

krzysztof-jusiak avatar krzysztof-jusiak commented on July 22, 2024

Thank you, @lp55 and @claremacrae for your work, very exciting stuff 👍 ApprovalTests looks very interesting and I would love to put a link to the integration between it and it on the website, please keep me in the know when you have something ready so that I can update the website, thanks again 🙏 nice one 👍

from ut.

krzysztof-jusiak avatar krzysztof-jusiak commented on July 22, 2024

Closing it for now as there is nothing to do from ut perspective ATM, feel free to reopen the issue and/or ping me with any updates/problems, thanks.

from ut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.