Commit 54add740 by Paolo Carlini Committed by Paolo Carlini

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
parent e0e3300c
2010-03-23 Paolo Carlini <paolo.carlini@oracle.com> 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. * testsuite/20_util/is_trivial/value.cc: New.
* testsuite/20_util/is_standard_layout/value.cc: Likewise. * testsuite/20_util/is_standard_layout/value.cc: Likewise.
* testsuite/20_util/is_pod/value.cc: Extend. * testsuite/20_util/is_pod/value.cc: Extend.
......
...@@ -22,34 +22,6 @@ ...@@ -22,34 +22,6 @@
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
#include <testsuite_tr1.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() void test01()
{ {
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
......
...@@ -22,34 +22,6 @@ ...@@ -22,34 +22,6 @@
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
#include <testsuite_tr1.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() void test01()
{ {
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
......
...@@ -22,34 +22,6 @@ ...@@ -22,34 +22,6 @@
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
#include <testsuite_tr1.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() void test01()
{ {
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
......
...@@ -129,6 +129,33 @@ namespace __gnu_test ...@@ -129,6 +129,33 @@ namespace __gnu_test
explicit ExplicitClass(int&); 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; } int truncate_float(float x) { return (int)x; }
long truncate_double(double x) { return (long)x; } long truncate_double(double x) { return (long)x; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment