]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix some of the examples and the make file.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 Nov 1998 12:08:21 +0000 (12:08 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 6 Nov 1998 12:08:21 +0000 (12:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@639 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/Makefile
tests/base/logtest.cc
tests/base/reference.cc

index 3ab82b48d2dcfe51af17f9c80d62e63e1f0e838a..dd786abb1b1601ea3db87e4aee7d0e8818693423 100644 (file)
@@ -29,5 +29,32 @@ ifeq ($(shell uname),Linux)
 CXX       = /home/wolf/bin/gcc/bin/c++
 endif
 
+
+test: run-reference run-logtest run-tensor
+
+
 reference: reference.go
-       $(CXX) -o $@ $^
\ No newline at end of file
+       $(CXX) -o $@ $^
+
+run-reference: reference
+       ./reference
+
+logtest: logtest.go
+       $(CXX) -o $@ $^ $D/base/lib/libbase.g.a
+
+run-logtest: logtest
+       ./logtest
+
+tensor: tensor.go
+       $(CXX) -o $@ $^
+
+run-tensor: tensor
+       ./tensor
+
+
+clean:
+       -rm *.o *.go reference logtest tensor
+
+
+
+.PHONY: test run-reference run-logtest run-tensor clean
index 3424ab0605eca7bde50e42cdea8c6725f4095e7c..b2d170394825bd58e00f1343fad00b1f3da37fac 100644 (file)
@@ -1,6 +1,5 @@
-#include "../newdeal/base/include/base/logstream.h"
+#include <base/logstream.h>
 
-LogStream deallog;
 
 main()
 {
index ae7f092151e92515c4479f943b95f48c53e0786b..e98fda917cbc59605e21638af8e627213e4fa9e8 100644 (file)
@@ -1,7 +1,7 @@
 
 #include <iostream>
 #include <base/subscriptor.h>
-
+#include <base/smartpointer.h>
 
 
 class Test : public Subscriptor
@@ -25,7 +25,8 @@ main()
   const Test b;
   SmartPointer<Test>       r=&a;
   SmartPointer<const Test> s=&a;
-  SmartPointer<Test>       t=&b;    // this one should give a warning
+//  SmartPointer<Test>       t=&b;    // this one should not work
+  SmartPointer<Test>       t=const_cast<Test*>(&b);
   SmartPointer<const Test> u=&b;
 
   a.f();            // should print "mutable", since #a# is not const

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.