From: wolf Date: Fri, 6 Nov 1998 12:08:21 +0000 (+0000) Subject: Fix some of the examples and the make file. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46a426c948a52e01f5202f49dd8fb8bd410e9864;p=dealii-svn.git Fix some of the examples and the make file. git-svn-id: https://svn.dealii.org/trunk@639 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/Makefile b/tests/base/Makefile index 3ab82b48d2..dd786abb1b 100644 --- a/tests/base/Makefile +++ b/tests/base/Makefile @@ -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 diff --git a/tests/base/logtest.cc b/tests/base/logtest.cc index 3424ab0605..b2d1703948 100644 --- a/tests/base/logtest.cc +++ b/tests/base/logtest.cc @@ -1,6 +1,5 @@ -#include "../newdeal/base/include/base/logstream.h" +#include -LogStream deallog; main() { diff --git a/tests/base/reference.cc b/tests/base/reference.cc index ae7f092151..e98fda917c 100644 --- a/tests/base/reference.cc +++ b/tests/base/reference.cc @@ -1,7 +1,7 @@ #include #include - +#include class Test : public Subscriptor @@ -25,7 +25,8 @@ main() const Test b; SmartPointer r=&a; SmartPointer s=&a; - SmartPointer t=&b; // this one should give a warning +// SmartPointer t=&b; // this one should not work + SmartPointer t=const_cast(&b); SmartPointer u=&b; a.f(); // should print "mutable", since #a# is not const