aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gdc.dg/runnable.d20
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index de3a3c4..8532240 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-01-20 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * gdc.dg/runnable.d: Add more tests for comparing complex types.
+
2019-01-20 Johannes Pfau <johannespfau@gmail.com>
* gdc.dg/runnable.d: Add tests for comparing complex types.
diff --git a/gcc/testsuite/gdc.dg/runnable.d b/gcc/testsuite/gdc.dg/runnable.d
index 65c71e8..e36a258 100644
--- a/gcc/testsuite/gdc.dg/runnable.d
+++ b/gcc/testsuite/gdc.dg/runnable.d
@@ -1553,6 +1553,26 @@ void test309()
assert(!(f1 is f3));
assert(!(f2 is f3));
assert(!(f1 !is f4));
+
+ struct CReal
+ {
+ creal value;
+ }
+
+ CReal s1 = CReal(+0.0 + 0.0i);
+ CReal s2 = CReal(+0.0 - 0.0i);
+ CReal s3 = CReal(-0.0 + 0.0i);
+ CReal s4 = CReal(+0.0 + 0.0i);
+
+ assert(s1 !is s2);
+ assert(s1 !is s3);
+ assert(s2 !is s3);
+ assert(s1 is s4);
+
+ assert(!(s1 is s2));
+ assert(!(s1 is s3));
+ assert(!(s2 is s3));
+ assert(!(s1 !is s4));
}
/******************************************/