Eliminate regress/usr.bin/c++/static_destructor - obsoleted with ATF tests

Replaced and enhanced with tests/usr.bin/c++/t_static_destructor.
This commit is contained in:
kamil 2017-05-14 02:07:58 +00:00
parent d1be05c0a9
commit 27a2f60665
5 changed files with 1 additions and 62 deletions

View File

@ -1,11 +1,7 @@
# $NetBSD: Makefile,v 1.19 2010/08/01 16:44:31 jmmv Exp $
# $NetBSD: Makefile,v 1.20 2017/05/14 02:07:58 kamil Exp $
.include <bsd.own.mk>
.if ${MKCXX} != "no"
SUBDIR+= c++
.endif
SUBDIR+= rtld
.include <bsd.subdir.mk>

View File

@ -1,5 +0,0 @@
# $NetBSD: Makefile,v 1.1 2007/09/17 17:37:48 drochner Exp $
SUBDIR= static_destructor
.include <bsd.subdir.mk>

View File

@ -1,11 +0,0 @@
# $NetBSD: Makefile,v 1.1 2007/09/17 17:37:48 drochner Exp $
PROG_CXX= static_destructor
NOMAN= # defined
regress:
./${PROG} > out && diff out ${.CURDIR}/expected
CLEANFILES+= out
.include <bsd.prog.mk>

View File

@ -1,4 +0,0 @@
constructor A
constructor B
destructor B : i = 1
destructor A : i = 10

View File

@ -1,37 +0,0 @@
/* $NetBSD: static_destructor.cc,v 1.1 2007/09/17 17:37:49 drochner Exp $ */
/*
* Tests proper order of destructor calls
* (must be in reverse order of constructor completion).
* from the gcc mailing list
*/
#include <iostream>
using namespace std;
class A
{
public:
int i;
A(int j) : i(j) { cout << "constructor A" << endl; }
~A() { cout << "destructor A : i = " << i << endl; }
};
class B
{
public:
A *n;
B() {
static A p(1);
n = &p;
cout << "constructor B" << endl;
}
~B() {
cout << "destructor B : i = " << n->i << endl;
n->i = 10;
}
};
class B x1;
int main (void) { return 0; }