pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:4085:    class Y {    inherit X;    protected void create(int yyy) {    X:x = yyy + 2;    }    };    return Y(5)->x;   ]], 7)      test_any([[ +  // Since the addition of F_APPEND_MAPPING in set_bar below +  // the setter is not being called anymore. Instead, the mapping +  // _data->foo is modified in place. +  class A(mapping _data) { +  mapping _modified = ([]); +  +  mixed `foo=(mixed v) { +  return _modified["foo"] = v; +  } +  +  mixed `foo() { +  return _data["foo"]; +  } +  +  void set_bar(int v) { +  this->foo += ([ "bar" : v ]); +  } +  }; +  +  object a = A(([ "foo" : ([]) ])); +  +  a->set_bar(2); +  +  return has_index(a->_modified, "foo"); + ]], 1) +  + test_any([[    // Triggered fatal since object_equal_p did not handle    // getter/setter identifier correctly    class A {    string `foo() { return "bar"; }    };       return equal(A(), A());   ]], 1)      test_eval_error([[