summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/six-speed/tests/template_string_tag.es6
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/webkit/PerformanceTests/six-speed/tests/template_string_tag.es6')
-rw-r--r--third_party/webkit/PerformanceTests/six-speed/tests/template_string_tag.es611
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/webkit/PerformanceTests/six-speed/tests/template_string_tag.es6 b/third_party/webkit/PerformanceTests/six-speed/tests/template_string_tag.es6
new file mode 100644
index 0000000000..dec6501bce
--- /dev/null
+++ b/third_party/webkit/PerformanceTests/six-speed/tests/template_string_tag.es6
@@ -0,0 +1,11 @@
+var data = [1, 2, 3];
+function tag(strings, value1, value2) {
+ return strings[0] + value1 + strings[1] + value2 + strings[2];
+}
+
+function fn() {
+ return tag`${data[0]} ${data[1] + data[2]}`;
+}
+
+assertEqual(fn(), '1 5');
+test(fn);