diff --git a/applications/test/pTraits/pTraitsTest.C b/applications/test/pTraits/pTraitsTest.C index 50b2fe780f..b739c0699a 100644 --- a/applications/test/pTraits/pTraitsTest.C +++ b/applications/test/pTraits/pTraitsTest.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,15 +27,49 @@ Description #include "IOstreams.H" #include "pTraits.H" +#include "vector.H" +#include "tensor.H" using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: +template +void printTraits() +{ + Info<< pTraits::typeName + << ": zero=" << pTraits::zero + << " one=" << pTraits::one << endl; +} + + +template +void printTraits(const pTraits& p) +{ + Info<< p.typeName << " == " << p << endl; +} + + int main() { - Info<< pTraits::typeName << endl; + printTraits(); + printTraits