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

Julien Fischer jfischer at opturion.com
Fri Aug 1 15:27:40 AEST 2014


On Fri, Aug 1, 2014 at 3:22 PM, Paul Bone <paul at bone.id.au> wrote:

> 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
>

s/passws/passes/


> +    % 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).



Can't you just set things up in the Mmakefile so that this test is not run
in non-C grades?
(As we do in the hard_coded directory.)

Cheers,
Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20140801/95ded034/attachment.html>


More information about the reviews mailing list