aboutsummaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rwxr-xr-xTests/TestTensorTools.m12
1 files changed, 7 insertions, 5 deletions
diff --git a/Tests/TestTensorTools.m b/Tests/TestTensorTools.m
index 4fd7bef..13b21e2 100755
--- a/Tests/TestTensorTools.m
+++ b/Tests/TestTensorTools.m
@@ -49,12 +49,14 @@ test[t_, r1_] :=
Print["Fail"]];
Print[]];
+count[num_Integer, noun_String] :=
+ ToString[num] <> " " <> noun <> If[num === 1, "", "s"];
+
reportResults[] :=
- If[testsFailed > 0,
- Print[ToString[testsFailed] <> " test" <>
- If[testsFailed > 1, "s", ""] <> " failed"],
- Print["All " <> ToString[testsPassed] <> " test" <>
- If[testsPassed > 1, "s", ""] <> " passed"]];
+ Module[
+ {},
+ Print[count[testsPassed, "test"], " passed"];
+ Print[count[testsFailed, "test"], " failed"]];
(****************************************************************)
(* Tests *)