function Test() {
'use strict';
var unit = null;
Object.defineProperty(this, 'unit', {
get: function() {
//console.log('get unit');
return unit;
},
set: function(val) {
console.log('unit->', val);
unit = val;
},
enumerable: true
});
}
var t = new Test();
ZnVuY3Rpb24gVGVzdCgpIHsKICAgICd1c2Ugc3RyaWN0JzsKICAgIHZhciB1bml0ID0gbnVsbDsKICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCAndW5pdCcsIHsKICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAvL2NvbnNvbGUubG9nKCdnZXQgdW5pdCcpOwogICAgICAgICAgICByZXR1cm4gdW5pdDsKICAgICAgICB9LAogICAgICAgIHNldDogZnVuY3Rpb24odmFsKSB7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCd1bml0LT4nLCB2YWwpOwogICAgICAgICAgICB1bml0ID0gdmFsOwogICAgICAgIH0sCiAgICAgICAgZW51bWVyYWJsZTogdHJ1ZQogICAgfSk7Cn0KdmFyIHQgPSBuZXcgVGVzdCgpOw==