14 p = auto_vec<long>(
new long[10] );
15 for(
int i=0; i < 10; ++i )
19 auto_vec<long> myfunc()
21 auto_vec<long> a(
new long[10] );
22 for(
int i=0; i < 10; ++i )
39 p = auto_vec<Class>(
new Class[10] );
42 auto_vec<Class> myfunc()
44 auto_vec<Class> a(
new Class[10] );
45 for(
int i=0; i < 10; ++i )
49 auto_vec<Class> myfunc2()
51 return auto_vec<Class>();
55 TEST_FIXTURE(LongIntFixture,TestConstructBasic)
59 CHECK( q.
get() == NULL );
67 CHECK( p.
get() == NULL );
68 CHECK( r.data() != NULL );
72 CHECK( r.get() == NULL );
73 CHECK( t.
data() != NULL );
77 for(
int i=0; i < 10; ++i )
78 CHECK_EQUAL(2*i,t[i]);
81 for(
int i=0; i < 10; ++i )
82 CHECK_EQUAL(2*i,c[i]);
86 TEST_FIXTURE(MyClassFixture,TestConstructClass)
89 CHECK( q.
get() == NULL );
92 for(
int i=0; i < 5; ++i )
93 CHECK_EQUAL(23,q[i].n);
95 CHECK( p.
get() == NULL );
96 CHECK( r.data() != NULL );
99 CHECK( q.
get() == NULL );
100 CHECK( t.
data() != NULL );
102 for(
int i=0; i < 10; ++i )
103 CHECK_EQUAL(i+17,t[i].n);
106 CHECK( b.
get() == NULL );
107 CHECK( c.
get() == NULL );
108 CHECK( t.
get() == NULL );
109 for(
int i=0; i < 10; ++i )
110 CHECK_EQUAL(i+17,a[i].n);
112 CHECK( a.
get() == NULL );
114 CHECK( a.
get() == NULL );
116 CHECK( a.
get() == NULL );
void reset(element_type *p=NULL)
element_type * data() const
element_type * get() const