From 469b53834c295bf49be593b0f5666e519e1a71a9 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Wed, 19 Jan 2000 18:57:05 +0100 Subject: [PATCH] Two tests for f_magic_set_index(). Rev: src/testsuite.in:1.261 --- src/testsuite.in | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/testsuite.in b/src/testsuite.in index 73aa194e1d..3c1c7689e0 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.260 2000/01/07 04:19:53 mast Exp $"]]); +test_true([["$Id: testsuite.in,v 1.261 2000/01/19 17:57:05 mast Exp $"]]); cond([[all_constants()->_verify_internals]], [[ @@ -956,6 +956,34 @@ test_any_equal([[ ({(["a":1]),(["a":1])}), (["a":1,"b":"d"])})) +test_any_equal([[ + /* This test tests a wild program pointer in the object o. The bug can trig + a coredump in a later test. */ + class A { + array a = ({1}); + void `->= (string var, mixed val) {::`->= (var, val);} + }; + class B { + inherit A; + void `->= (string var, mixed val) {if (var) ::`->= (var, val);} + }; + object o = B(); + o->a += ({2}); + return o->a; +]], ({1,2})) +test_any_equal([[ + class A { + array a = ({1}); + void `->= (string var, mixed val) {::`->= (var, val);} + }; + class B { + inherit A; + }; + object o = B(); + o->a += ({2}); + return o->a; +]], ({1,2})) + test_true(mappingp(_memory_usage())) test_true(_refs("")); test_true(_refs(({}))); -- GitLab