Skip to content

Commit 84c899b

Browse files
committed
[libc][math] Extract non-MPFR math tests into libc-math-smoke-tests.
Extract non-MPFR math tests into libc-math-smoke-tests. Reviewed By: sivachandra, jhuber6 Differential Revision: https://reviews.llvm.org/D159477
1 parent 82676d4 commit 84c899b

File tree

134 files changed

+6184
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6184
-118
lines changed

libc/src/math/docs/add_math_function.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,17 @@ Besides the usual testing macros like `EXPECT_EQ, ASSERT_TRUE, ...` there are
8888
testing macros specifically used for floating point values, such as
8989
`EXPECT_FP_EQ, ASSERT_FP_LE, ...`
9090

91-
- Add unit test to:
91+
- Add smoke tests (simple cases and zeros / inf / nan inputs or outputs) to:
92+
```
93+
libc/test/src/math/smoke/<func>_test.cpp
94+
```
95+
- Add unit test that might require MPFR to:
9296
```
9397
libc/test/src/math/<func>_test.cpp
9498
```
95-
- Add the corresponding entry point to:
99+
- Add the corresponding entry points to:
96100
```
101+
libc/test/src/math/smoke/CMakeLists.txt
97102
libc/test/src/math/CMakeLists.txt
98103
```
99104

@@ -160,6 +165,16 @@ implementation (which is very often glibc).
160165
$ ninja check-libc
161166
```
162167

168+
- Run math smoke tests only:
169+
```
170+
$ ninja libc-math-smoke-tests
171+
```
172+
173+
- Run math smoke and unit tests:
174+
```
175+
$ ninja libc-math-unittests
176+
```
177+
163178
- Build and Run a specific unit test:
164179
```
165180
$ ninja libc.test.src.math.<func>_test

0 commit comments

Comments
 (0)