Home / Companies / Redpanda / Blog / Post Details
Content Deep Dive

Oxla: Simplify your testing with Mixins in C++

Blog post from Redpanda

Post Details
Company
Date Published
Author
Krzysztof Smogór
Word Count
1,280
Company Posts That Month
181
Language
English
Hacker News Points
-
Post removed?
No
Summary

Exploring the challenges of testing complex codebases, the text delves into refining test suites using custom allocators and partial fixtures within the Google Test framework. The author describes the initial problem of managing independent resources within test suites and proposes a solution that involves combining partial fixtures using C++'s multiple inheritance and the CRTP pattern. Though multiple inheritance presents issues like virtual function ambiguity and inheritance diamonds, the post suggests leveraging mix-ins as an alternative, drawing inspiration from Java's Mixin library. By implementing recursive templates and fold expressions, the solution simplifies the integration of partial fixtures, enabling a more organized and flexible testing environment. The author shares insights from developing these tools at Oxla, inviting readers to explore further resources and a code repository for practical examples.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.