1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/jaeger/clonefun.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,17 @@ 1.4 + 1.5 +// Functions which have been marked as singletons should not be cloned. 1.6 + 1.7 +BeatDetektor = function() 1.8 +{ 1.9 + this.config = BeatDetektor.config; 1.10 + 1.11 + assertEq(this.config.a, 0); 1.12 + assertEq(this.config.b, 1); 1.13 +} 1.14 + 1.15 +BeatDetektor.config_default = { a:0, b:1 }; 1.16 +BeatDetektor.config = BeatDetektor.config_default; 1.17 + 1.18 +var bd = new BeatDetektor(); 1.19 + 1.20 +assertEq(bd.config === BeatDetektor.config, true);