diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-11-14 11:09:23 +0100 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-11-14 11:09:23 +0100 |
commit | 88a75e3c0c518643656a9dc5480635e69512e240 (patch) | |
tree | 39e416785be1019e7b3ac81a3f68a7be66ba498c /Tests | |
parent | 95e3bbcf14c33a54a5bc1bd881f4103510e35c81 (diff) |
TestTensorTools.m: Improve formatting of output
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/TestTensorTools.m | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Tests/TestTensorTools.m b/Tests/TestTensorTools.m index 0daf891..0395f2d 100644 --- a/Tests/TestTensorTools.m +++ b/Tests/TestTensorTools.m @@ -9,6 +9,7 @@ (* Initialise *) $Path = Join[{"../Tools/CodeGen", "../Tools/MathematicaMisc"}, $Path]; +SetOptions["stdout", PageWidth -> Infinity]; Print["Loading tensortools"]; << TensorTools`; @@ -22,18 +23,19 @@ SetEnhancedTimes[enhancedTimes]; SetAttributes[test, HoldFirst] test[t_, r1_] := - Module[{r}, - r = If[enhancedTimes, r1 /. Times -> TensorProduct, r1]; - If[Expand[Evaluate[t]] === Expand[r], testsPassed++; - Print["Input: ", HoldForm[InputForm@t]]; - Print["Result: ", Expand[r]//InputForm]; - Print["Pass"], - (* else *) - testsFailed++; - Print["Input:", HoldForm@t]; - Print["Expected:", Expand[r], FullForm[Expand@r]]; - Print["Result:", Expand@Evaluate[t], FullForm[Expand@Evaluate[t]]]; - Print["Fail"]]; + Module[ + {r}, + Print["Input: ", HoldForm[InputForm@t]]; + r = If[enhancedTimes, r1 /. Times -> TensorProduct, r1]; + Print["Expected: ", Expand@r//InputForm]; + If[Expand[Evaluate[t]] === Expand[r], + testsPassed++; + Print["Result: ", Expand[r]//InputForm]; + Print["Pass"], + (* else *) + testsFailed++; + Print["Result:", Expand@Evaluate[t]//InputForm]; + Print["Fail"]]; Print[]]; reportResults[] := |