[m-rev.] diff: Fix weak pointer test.

Paul Bone paul at bone.id.au
Fri Aug 1 15:22:31 AEST 2014


Fix weak pointer test.

Branch: master, version-14_01-branch

---

This test was broken in non-C grades due to an omission.

general/weak_ptr.m:
general/weak_ptr.exp2:
    As above.
---
 tests/general/weak_ptr.exp2 | 1 +
 tests/general/weak_ptr.m    | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 tests/general/weak_ptr.exp2

diff --git a/tests/general/weak_ptr.exp2 b/tests/general/weak_ptr.exp2
new file mode 100644
index 0000000..0b2cc3a
--- /dev/null
+++ b/tests/general/weak_ptr.exp2
@@ -0,0 +1 @@
+Test not supported in this grade.
diff --git a/tests/general/weak_ptr.m b/tests/general/weak_ptr.m
index 466e08d..5b39ef2 100644
--- a/tests/general/weak_ptr.m
+++ b/tests/general/weak_ptr.m
@@ -159,5 +159,8 @@ drop(int n, list* cur)
     ").
 
 test(!IO) :-
-    io.write_string("Test not supported in this grade.\n").
+    % We provide a weak_ptr.exp2 file so that the test passws in non C
+    % grades.  Java and C# provide their own weak pointer code that we do
+    % not need to test as part of the Mercury test suite.
+    io.write_string("Test not supported in this grade.\n", !IO).
 
-- 
2.0.0




More information about the reviews mailing list