diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /devtools/client/debugger/test/mochitest/code_math.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/debugger/test/mochitest/code_math.js')
-rw-r--r-- | devtools/client/debugger/test/mochitest/code_math.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/devtools/client/debugger/test/mochitest/code_math.js b/devtools/client/debugger/test/mochitest/code_math.js new file mode 100644 index 000000000..f765817bb --- /dev/null +++ b/devtools/client/debugger/test/mochitest/code_math.js @@ -0,0 +1,45 @@ +function add(a, b, k) { + var result = a + b; + return k(result); +} + +function sub(a, b, k) { + var result = a - b; + return k(result); +} + +function mul(a, b, k) { + var result = a * b; + return k(result); +} + +function div(a, b, k) { + var result = a / b; + return k(result); +} + +function arithmetic() { + add(4, 4, function (a) { + // 8 + sub(a, 2, function (b) { + // 6 + mul(b, 3, function (c) { + // 18 + div(c, 2, function (d) { + // 9 + console.log(d); + }); + }); + }); + }); +} + +// Compile with closure compiler and the following flags: +// +// --compilation_level WHITESPACE_ONLY +// --source_map_format V3 +// --create_source_map code_math.map +// --js_output_file code_math.min.js +// +// And then append the sourceMappingURL comment directive to code_math.min.js +// manually. |