You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`TEST_F` macros go **outside** the anonymous namespace
45
45
- Include `<gtest/gtest.h>` (not `<gmock/gmock.h>`) unless gmock matchers are needed
46
46
- Use `testing::StrictMock<MockType>` for strict mock expectations
47
+
-**Math in tests**: use `std::sin`, `std::cos`, `std::abs`, etc. directly — never `math::Sin`, `math::Cos`, `math::Abs`, etc. in test code
47
48
-**ONLY `StrictMock`**: Never use `testing::NiceMock<>` or bare mock instantiation — `NiceMock` silences unexpected-call warnings, masking test gaps; `StrictMock` enforces all interactions explicitly
48
49
- Test `float` only (single type) — no multi-type tests
49
50
-**No redundant tests** — implement exactly the spec's enumerated cases; no overlapping/extra cases
Copy file name to clipboardExpand all lines: README.md
+71Lines changed: 71 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,77 @@ xhost +local:docker
89
89
> **Note:** The Dev Container sets `DISPLAY=host.docker.internal:0.0` to forward GUI windows over TCP. On Linux, if you prefer Unix socket forwarding, you can override `DISPLAY` to `:0` inside the container and add a bind mount for `/tmp/.X11-unix`.
90
90
91
91
92
+
## Math Function Overrides
93
+
94
+
All math functions used by the library (`Sin`, `Cos`, `Abs`, `Sqrt`, `Pow`, …) are centralised in
95
+
`numerical/math/Math.hpp` under the `math::` namespace.
96
+
Each function ships with a default `constexpr` implementation that forwards to the corresponding
97
+
`std::` counterpart, but every one of them can be replaced at compile time with a
98
+
platform-specific implementation — CORDIC, hardware intrinsics, look-up tables, etc.
99
+
100
+
### How to override a function
101
+
102
+
**1. Define the override macro in CMake** (suppresses the default definition):
0 commit comments