1045 |
06 Feb 08 |
peter |
// $Id$ |
1045 |
06 Feb 08 |
peter |
2 |
|
1045 |
06 Feb 08 |
peter |
3 |
/* |
2119 |
12 Dec 09 |
peter |
Copyright (C) 2008 Jari Häkkinen, Peter Johansson |
4359 |
23 Aug 23 |
peter |
Copyright (C) 2012 Peter Johansson |
1045 |
06 Feb 08 |
peter |
6 |
|
1437 |
25 Aug 08 |
peter |
This file is part of the yat library, http://dev.thep.lu.se/yat |
1045 |
06 Feb 08 |
peter |
8 |
|
1045 |
06 Feb 08 |
peter |
The yat library is free software; you can redistribute it and/or |
1045 |
06 Feb 08 |
peter |
modify it under the terms of the GNU General Public License as |
1486 |
09 Sep 08 |
jari |
published by the Free Software Foundation; either version 3 of the |
1045 |
06 Feb 08 |
peter |
License, or (at your option) any later version. |
1045 |
06 Feb 08 |
peter |
13 |
|
1045 |
06 Feb 08 |
peter |
The yat library is distributed in the hope that it will be useful, |
1045 |
06 Feb 08 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1045 |
06 Feb 08 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1045 |
06 Feb 08 |
peter |
General Public License for more details. |
1045 |
06 Feb 08 |
peter |
18 |
|
1045 |
06 Feb 08 |
peter |
You should have received a copy of the GNU General Public License |
1487 |
10 Sep 08 |
jari |
along with yat. If not, see <http://www.gnu.org/licenses/>. |
1045 |
06 Feb 08 |
peter |
21 |
*/ |
1045 |
06 Feb 08 |
peter |
22 |
|
2881 |
18 Nov 12 |
peter |
23 |
#include <config.h> |
2881 |
18 Nov 12 |
peter |
24 |
|
1248 |
19 Mar 08 |
peter |
25 |
#include "Suite.h" |
1248 |
19 Mar 08 |
peter |
26 |
|
1045 |
06 Feb 08 |
peter |
27 |
#include "yat/utility/SmartPtr.h" |
1121 |
22 Feb 08 |
peter |
28 |
#include "yat/utility/Matrix.h" |
1045 |
06 Feb 08 |
peter |
29 |
|
1045 |
06 Feb 08 |
peter |
30 |
#include <fstream> |
1045 |
06 Feb 08 |
peter |
31 |
#include <iostream> |
1045 |
06 Feb 08 |
peter |
32 |
|
1248 |
19 Mar 08 |
peter |
33 |
int main(int argc, char* argv[]) |
4200 |
19 Aug 22 |
peter |
34 |
{ |
1045 |
06 Feb 08 |
peter |
35 |
using namespace theplu::yat; |
1045 |
06 Feb 08 |
peter |
36 |
|
1248 |
19 Mar 08 |
peter |
37 |
test::Suite suite(argc, argv); |
1045 |
06 Feb 08 |
peter |
38 |
|
1248 |
19 Mar 08 |
peter |
39 |
suite.err() << "testing smart_ptr" << std::endl; |
1045 |
06 Feb 08 |
peter |
40 |
|
1121 |
22 Feb 08 |
peter |
41 |
utility::SmartPtr<utility::Matrix> m(new utility::Matrix(10,10)); |
1045 |
06 Feb 08 |
peter |
42 |
if (m->columns()==10){ |
1121 |
22 Feb 08 |
peter |
43 |
utility::SmartPtr<utility::Matrix> m2(m); |
1045 |
06 Feb 08 |
peter |
44 |
m2 = m; |
1045 |
06 Feb 08 |
peter |
45 |
} |
1045 |
06 Feb 08 |
peter |
46 |
else |
1248 |
19 Mar 08 |
peter |
47 |
suite.add(false); |
1045 |
06 Feb 08 |
peter |
48 |
|
1045 |
06 Feb 08 |
peter |
49 |
m = m; |
1121 |
22 Feb 08 |
peter |
50 |
utility::Matrix m2 = *m; |
1045 |
06 Feb 08 |
peter |
51 |
|
1045 |
06 Feb 08 |
peter |
52 |
if (m->columns()!=10) |
1248 |
19 Mar 08 |
peter |
53 |
suite.add(false); |
1045 |
06 Feb 08 |
peter |
54 |
|
1248 |
19 Mar 08 |
peter |
55 |
return suite.return_value(); |
1045 |
06 Feb 08 |
peter |
56 |
} |