1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
11 // complex& operator/=(const complex& rhs);
16 #include "test_macros.h"
22 std::complex<T
> c(-4, 7.5);
23 const std::complex<T
> c2(1.5, 2.5);
24 assert(c
.real() == -4);
25 assert(c
.imag() == 7.5);
27 assert(c
.real() == 1.5);
28 assert(c
.imag() == 2.5);
30 assert(c
.real() == 1);
31 assert(c
.imag() == 0);
36 std::complex<int> ic (1,1);
38 assert(c3
.real() == 0.5);
39 assert(c3
.imag() == -0.5);
42 std::complex<float> fc (1,1);
44 assert(c3
.real() == 0.5);
45 assert(c3
.imag() == -0.5);