home.social

#googletest — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #googletest, aggregated by home.social.

fetched live
  1. NEW! Leanpub Book LAUNCH 🚀 No More Helloworlds. Build a Real C++ App: Master Real C++ Development: Architecture, Git, Testing & CMake in One Practical Workflow by Nikolai Kutiavin

    youtu.be/DTu3Ysr74LQ

    #books #leanpublishing #selfpublishing #CPlusPlus #CMake #SoftwareArchitecture #GoogleTest #CppDevelopment

  2. I used to think Rust testing was far behind Python with pytest, but that’s not really the case. There's a googletest crate that fixes so many pain points: clearer failure messages, test fixtures, approx comparisons for floats, and more.

    If you write tests in Rust, it’s worth giving this crate a try. I'm surprised it isn’t more widely used, because it makes the testing experience much smoother.

    docs.rs/googletest/latest/goog

  3. Okay, so when using #gtest / #gmock / #googletest to write C++ unit tests for code that uses dependency injection, how the *hell* do go about mocking dependencies of a class under test without having to mock the dependency class' dependencies, and *those* class' dependencies, and so on until you've mocked every class in the dependency tree of the class under test?

    "Interfaces" or "templates" are *not* valid answers, as they drive complexity into your non-test code purely to support testing!