pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2015-02-01
2015-02-01 15:43:37 by Arne Goedeke <el@laramies.com>
da0f2668c033d7ad38ede2848abaed1acdc8d633 (
28
lines) (+
28
/-
0
)
[
Show
|
Annotate
]
Branch:
8.0
Testsuite: added test for a regression
This worked fine before F_APPEND_MAPPING has been added.
4086:
]], 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 {