You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
343 B
14 lines
343 B
var codegen = require("..");
|
|
|
|
// new require("benchmark").Suite().add("add", function() {
|
|
|
|
var add = codegen(["a", "b"], "add")
|
|
("// awesome comment")
|
|
("return a + b - c + %d", 1)
|
|
({ c: 1 });
|
|
|
|
if (add(1, 2) !== 3)
|
|
throw Error("failed");
|
|
|
|
// }).on("cycle", function(event) { process.stdout.write(String(event.target) + "\n"); }).run();
|