[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / libcxx / test / std / numerics / complex.number / complex.ops / complex_divide_scalar.pass.cpp
blob24a0e8cb61a381a2f4e2e96b1072d43bc92b781f
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <complex>
11 // template<class T>
12 // complex<T>
13 // operator/(const complex<T>& lhs, const T& rhs);
15 #include <complex>
16 #include <cassert>
18 #include "test_macros.h"
20 template <class T>
21 void
22 test(const std::complex<T>& lhs, const T& rhs, std::complex<T> x)
24 assert(lhs / rhs == x);
27 template <class T>
28 void
29 test()
31 std::complex<T> lhs(-4.0, 7.5);
32 T rhs(2);
33 std::complex<T> x(-2, 3.75);
34 test(lhs, rhs, x);
37 int main(int, char**)
39 test<float>();
40 test<double>();
41 test<long double>();
43 return 0;