diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-03-29 09:01:23 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-03-29 09:01:23 -0700 |
commit | 6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced (patch) | |
tree | 1deecdcfbf185c7044bc861d0ace51285c96cb62 /libphobos/testsuite | |
parent | 795cffe109e28b248a54b8ee583cbae48368c2a7 (diff) | |
parent | aa8f4242efc99f24de73c59d53996f28db28c13f (diff) | |
download | gcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.zip gcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.tar.gz gcc-6612f4f8cb9b0d5af18ec69ad04e56debc3e6ced.tar.bz2 |
Merge from trunk revision aa8f4242efc99f24de73c59d53996f28db28c13f.
Diffstat (limited to 'libphobos/testsuite')
27 files changed, 70 insertions, 28 deletions
diff --git a/libphobos/testsuite/Makefile.am b/libphobos/testsuite/Makefile.am index feec4fc..410f648 100644 --- a/libphobos/testsuite/Makefile.am +++ b/libphobos/testsuite/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for the testsuite subdirectory of the D Standard library. -## Copyright (C) 2016-2022 Free Software Foundation, Inc. +## Copyright (C) 2016-2023 Free Software Foundation, Inc. ## ## GCC is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/config/default.exp b/libphobos/testsuite/config/default.exp index a627ef7..13bca62 100644 --- a/libphobos/testsuite/config/default.exp +++ b/libphobos/testsuite/config/default.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/lib/libphobos-dg.exp b/libphobos/testsuite/lib/libphobos-dg.exp index 37b5456..d41f20e 100644 --- a/libphobos/testsuite/lib/libphobos-dg.exp +++ b/libphobos/testsuite/lib/libphobos-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/lib/libphobos.exp b/libphobos/testsuite/lib/libphobos.exp index 1825a45..a921a37 100644 --- a/libphobos/testsuite/lib/libphobos.exp +++ b/libphobos/testsuite/lib/libphobos.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.aa/aa.exp b/libphobos/testsuite/libphobos.aa/aa.exp index 58b95e5..aa0ff31 100644 --- a/libphobos/testsuite/libphobos.aa/aa.exp +++ b/libphobos/testsuite/libphobos.aa/aa.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2022 Free Software Foundation, Inc. +# Copyright (C) 2018-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.allocations/allocations.exp b/libphobos/testsuite/libphobos.allocations/allocations.exp index 1e95f3c..5b94181 100644 --- a/libphobos/testsuite/libphobos.allocations/allocations.exp +++ b/libphobos/testsuite/libphobos.allocations/allocations.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.betterc/betterc.exp b/libphobos/testsuite/libphobos.betterc/betterc.exp index 10a44af..d5ec8ad 100644 --- a/libphobos/testsuite/libphobos.betterc/betterc.exp +++ b/libphobos/testsuite/libphobos.betterc/betterc.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.config/config.exp b/libphobos/testsuite/libphobos.config/config.exp index 79434d7..10c36d2 100644 --- a/libphobos/testsuite/libphobos.config/config.exp +++ b/libphobos/testsuite/libphobos.config/config.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.cycles/cycles.exp b/libphobos/testsuite/libphobos.cycles/cycles.exp index fa3dfd4..445841a 100644 --- a/libphobos/testsuite/libphobos.cycles/cycles.exp +++ b/libphobos/testsuite/libphobos.cycles/cycles.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.druntime/druntime.exp b/libphobos/testsuite/libphobos.druntime/druntime.exp index e1185a2..8a55f92 100644 --- a/libphobos/testsuite/libphobos.druntime/druntime.exp +++ b/libphobos/testsuite/libphobos.druntime/druntime.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2022 Free Software Foundation, Inc. +# Copyright (C) 2019-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp b/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp index 432a269..70bfc69 100644 --- a/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp +++ b/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2022 Free Software Foundation, Inc. +# Copyright (C) 2019-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.exceptions/exceptions.exp b/libphobos/testsuite/libphobos.exceptions/exceptions.exp index 1e95f3c..5b94181 100644 --- a/libphobos/testsuite/libphobos.exceptions/exceptions.exp +++ b/libphobos/testsuite/libphobos.exceptions/exceptions.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.exceptions/refcounted.d b/libphobos/testsuite/libphobos.exceptions/refcounted.d index 2b7e79b..e4ed8e8 100644 --- a/libphobos/testsuite/libphobos.exceptions/refcounted.d +++ b/libphobos/testsuite/libphobos.exceptions/refcounted.d @@ -2,9 +2,9 @@ class E : Exception { static int instances; - this(string msg = "") + this(string msg = "", Throwable nextInChain = null) { - super(msg); + super(msg, nextInChain); instances++; } @@ -93,4 +93,34 @@ void main() } assert(E.instances == 0); + + try + { + throw new E("first"); + } + catch (E first) + { + assert(first.refcount == 2); + assert(E.instances == 1); + + try + { + throw new E("second", first); + } + catch (E second) + { + assert(first.next is null); + assert(second.next is first); + + assert(first.refcount == 3); + assert(second.refcount == 2); + + assert(E.instances == 2); + } + + assert(first.refcount == 2); + assert(E.instances == 1); + } + + assert(E.instances == 0); } diff --git a/libphobos/testsuite/libphobos.gc/gc.exp b/libphobos/testsuite/libphobos.gc/gc.exp index 4164030..4de57e8 100644 --- a/libphobos/testsuite/libphobos.gc/gc.exp +++ b/libphobos/testsuite/libphobos.gc/gc.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.gc/issue22843.d b/libphobos/testsuite/libphobos.gc/issue22843.d new file mode 100644 index 0000000..bf6e830 --- /dev/null +++ b/libphobos/testsuite/libphobos.gc/issue22843.d @@ -0,0 +1,12 @@ +import core.memory; +void main() +{ + auto collections = GC.profileStats().numCollections; + // loop until we trigger a collection + for (;;) + { + cast(void)GC.malloc(100_000, GC.BlkAttr.NO_SCAN); + if (GC.profileStats().numCollections == collections+1) + break; + } +} diff --git a/libphobos/testsuite/libphobos.hash/hash.exp b/libphobos/testsuite/libphobos.hash/hash.exp index 58b95e5..aa0ff31 100644 --- a/libphobos/testsuite/libphobos.hash/hash.exp +++ b/libphobos/testsuite/libphobos.hash/hash.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2022 Free Software Foundation, Inc. +# Copyright (C) 2018-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.hash/test_hash.d b/libphobos/testsuite/libphobos.hash/test_hash.d index 0ad2443..a6d7e5a 100644 --- a/libphobos/testsuite/libphobos.hash/test_hash.d +++ b/libphobos/testsuite/libphobos.hash/test_hash.d @@ -290,14 +290,14 @@ void issue22076() extern(C++) static class C0 { int foo() { return 0; } // Need at least one function in vtable. - S0 a; alias a this; + S0 a; alias a this; // { dg-warning "is deprecated" } } extern(C++) static class C1 { S1 a; inout(S1)* b() inout nothrow { return &a; } - alias b this; + alias b this; // { dg-warning "is deprecated" } } cast(void) hashOf(S0.init); diff --git a/libphobos/testsuite/libphobos.imports/imports.exp b/libphobos/testsuite/libphobos.imports/imports.exp index c7c4459..6ed1d10 100644 --- a/libphobos/testsuite/libphobos.imports/imports.exp +++ b/libphobos/testsuite/libphobos.imports/imports.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.init_fini/init_fini.exp b/libphobos/testsuite/libphobos.init_fini/init_fini.exp index 5b320de..8cf3f82 100644 --- a/libphobos/testsuite/libphobos.init_fini/init_fini.exp +++ b/libphobos/testsuite/libphobos.init_fini/init_fini.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.lifetime/lifetime.exp b/libphobos/testsuite/libphobos.lifetime/lifetime.exp index 4164030..4de57e8 100644 --- a/libphobos/testsuite/libphobos.lifetime/lifetime.exp +++ b/libphobos/testsuite/libphobos.lifetime/lifetime.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.phobos/phobos.exp b/libphobos/testsuite/libphobos.phobos/phobos.exp index d3d65fc..374ef49 100644 --- a/libphobos/testsuite/libphobos.phobos/phobos.exp +++ b/libphobos/testsuite/libphobos.phobos/phobos.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2022 Free Software Foundation, Inc. +# Copyright (C) 2019-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp index 5e4d754..6c67b08 100644 --- a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp +++ b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2022 Free Software Foundation, Inc. +# Copyright (C) 2019-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.shared/shared.exp b/libphobos/testsuite/libphobos.shared/shared.exp index 6e5eb3c..05b23cd 100644 --- a/libphobos/testsuite/libphobos.shared/shared.exp +++ b/libphobos/testsuite/libphobos.shared/shared.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.thread/thread.exp b/libphobos/testsuite/libphobos.thread/thread.exp index 1e95f3c..5b94181 100644 --- a/libphobos/testsuite/libphobos.thread/thread.exp +++ b/libphobos/testsuite/libphobos.thread/thread.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.traits/traits.exp b/libphobos/testsuite/libphobos.traits/traits.exp index 4164030..4de57e8 100644 --- a/libphobos/testsuite/libphobos.traits/traits.exp +++ b/libphobos/testsuite/libphobos.traits/traits.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.typeinfo/typeinfo.exp b/libphobos/testsuite/libphobos.typeinfo/typeinfo.exp index 5b320de..8cf3f82 100644 --- a/libphobos/testsuite/libphobos.typeinfo/typeinfo.exp +++ b/libphobos/testsuite/libphobos.typeinfo/typeinfo.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2022 Free Software Foundation, Inc. +# Copyright (C) 2017-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libphobos/testsuite/libphobos.unittest/unittest.exp b/libphobos/testsuite/libphobos.unittest/unittest.exp index 2a019ca..5e80620 100644 --- a/libphobos/testsuite/libphobos.unittest/unittest.exp +++ b/libphobos/testsuite/libphobos.unittest/unittest.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by |