testsuite_tr1.h (NType, [...]): Add.

2010-03-23  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_tr1.h (NType, TType, SLType, PODType): Add.
	* testsuite/20_util/is_trivial/value.cc: Adjust.
	* testsuite/20_util/is_standard_layout/value.cc: Likewise.
	* testsuite/20_util/is_pod/value.cc: Likewise.

From-SVN: r157673
This commit is contained in:
Paolo Carlini 2010-03-23 15:20:29 +00:00 committed by Paolo Carlini
parent e0e3300cb1
commit 54add74038
5 changed files with 34 additions and 84 deletions

View File

@ -1,3 +1,10 @@
2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/util/testsuite_tr1.h (NType, TType, SLType, PODType): Add.
* testsuite/20_util/is_trivial/value.cc: Adjust.
* testsuite/20_util/is_standard_layout/value.cc: Likewise.
* testsuite/20_util/is_pod/value.cc: Likewise.
2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/20_util/is_trivial/value.cc: New.

View File

@ -22,34 +22,6 @@
#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
struct NType // neither trivial nor standard-layout
{
int i;
int j;
virtual ~NType();
};
struct TType // trivial but not standard-layout
{
int i;
private:
int j;
};
struct SLType // standard-layout but not trivial
{
int i;
int j;
~SLType();
};
struct PODType // both trivial and standard-layout
{
int i;
int j;
};
void test01()
{
bool test __attribute__((unused)) = true;

View File

@ -22,34 +22,6 @@
#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
struct NType // neither trivial nor standard-layout
{
int i;
int j;
virtual ~NType();
};
struct TType // trivial but not standard-layout
{
int i;
private:
int j;
};
struct SLType // standard-layout but not trivial
{
int i;
int j;
~SLType();
};
struct PODType // both trivial and standard-layout
{
int i;
int j;
};
void test01()
{
bool test __attribute__((unused)) = true;

View File

@ -22,34 +22,6 @@
#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
struct NType // neither trivial nor standard-layout
{
int i;
int j;
virtual ~NType();
};
struct TType // trivial but not standard-layout
{
int i;
private:
int j;
};
struct SLType // standard-layout but not trivial
{
int i;
int j;
~SLType();
};
struct PODType // both trivial and standard-layout
{
int i;
int j;
};
void test01()
{
bool test __attribute__((unused)) = true;

View File

@ -129,6 +129,33 @@ namespace __gnu_test
explicit ExplicitClass(int&);
};
struct NType // neither trivial nor standard-layout
{
int i;
int j;
virtual ~NType();
};
struct TType // trivial but not standard-layout
{
int i;
private:
int j;
};
struct SLType // standard-layout but not trivial
{
int i;
int j;
~SLType();
};
struct PODType // both trivial and standard-layout
{
int i;
int j;
};
int truncate_float(float x) { return (int)x; }
long truncate_double(double x) { return (long)x; }