File: 434041.doctest

package info (click to toggle)
htmlunit-core-js 2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 5,804 kB
  • ctags: 10,088
  • sloc: java: 75,059; xml: 889; sh: 14; makefile: 11
file content (11 lines) | stat: -rw-r--r-- 277 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
// Regression test for bug https://bugzilla.mozilla.org/show_bug.cgi?id=434041
js> function add(_object, _key, _value) {
  >   _object[_key] = _value;
  > }
js> var o = {};
js> add(o, 'a', 'b');
js> o.toSource();
({a:"b"})
js> add(o, 3, 'c');
js> o.toSource();
({a:"b", 3:"c"})