diff options
Diffstat (limited to 'js/src/jit-test/tests/jaeger/clonefun.js')
-rw-r--r-- | js/src/jit-test/tests/jaeger/clonefun.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/clonefun.js b/js/src/jit-test/tests/jaeger/clonefun.js new file mode 100644 index 000000000..950ae3922 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/clonefun.js @@ -0,0 +1,17 @@ + +// Functions which have been marked as singletons should not be cloned. + +BeatDetektor = function() +{ + this.config = BeatDetektor.config; + + assertEq(this.config.a, 0); + assertEq(this.config.b, 1); +} + +BeatDetektor.config_default = { a:0, b:1 }; +BeatDetektor.config = BeatDetektor.config_default; + +var bd = new BeatDetektor(); + +assertEq(bd.config === BeatDetektor.config, true); |