summaryrefslogtreecommitdiff
path: root/libc/test/src/stdlib/ldiv_test.cpp
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2021-09-17 04:38:17 +0000
committerSiva Chandra Reddy <sivachandra@google.com>2021-09-20 04:51:42 +0000
commit74670e79b0a00224c04dfc6a446ea4439f4cfca4 (patch)
tree39b7058e5bb66bdf72fded56495b59d0c2815f61 /libc/test/src/stdlib/ldiv_test.cpp
parentdef15c5fb6a117c1b6d8b2835f6760f814410582 (diff)
[libc] Add implementations of div, ldiv, lldiv and imaxdiv.
Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D109952
Diffstat (limited to 'libc/test/src/stdlib/ldiv_test.cpp')
-rw-r--r--libc/test/src/stdlib/ldiv_test.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/test/src/stdlib/ldiv_test.cpp b/libc/test/src/stdlib/ldiv_test.cpp
new file mode 100644
index 000000000000..d28d38789a71
--- /dev/null
+++ b/libc/test/src/stdlib/ldiv_test.cpp
@@ -0,0 +1,15 @@
+//===-- Unittests for ldiv ------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "DivTest.h"
+
+#include "src/stdlib/ldiv.h"
+
+#include <stdlib.h>
+
+LIST_DIV_TESTS(long, ldiv_t, __llvm_libc::ldiv)