From 8c6b1320de010caf629251e8046c258e5b4ad949 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Mon, 25 Apr 2016 16:32:47 -0400 Subject: [PATCH] Add assertion messages for function invocation --- src/dstr-binding/default/arrow-function.template | 2 +- src/dstr-binding/default/cls-decl-gen-meth-static.template | 2 +- src/dstr-binding/default/cls-decl-gen-meth.template | 2 +- src/dstr-binding/default/cls-decl-meth-static.template | 2 +- src/dstr-binding/default/cls-decl-meth.template | 2 +- src/dstr-binding/default/cls-expr-gen-meth-static.template | 2 +- src/dstr-binding/default/cls-expr-gen-meth.template | 2 +- src/dstr-binding/default/cls-expr-meth-static.template | 2 +- src/dstr-binding/default/cls-expr-meth.template | 2 +- src/dstr-binding/default/func-decl.template | 2 +- src/dstr-binding/default/func-expr.template | 2 +- src/dstr-binding/default/gen-func-decl.template | 2 +- src/dstr-binding/default/gen-func-expr.template | 2 +- src/dstr-binding/default/gen-meth.template | 2 +- src/dstr-binding/default/meth.template | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/dstr-binding/default/arrow-function.template b/src/dstr-binding/default/arrow-function.template index 98f2dd8d5b..85969d4cbd 100644 --- a/src/dstr-binding/default/arrow-function.template +++ b/src/dstr-binding/default/arrow-function.template @@ -45,4 +45,4 @@ f = (/*{ elems }*/) => { }; f(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'arrow function invoked exactly once'); diff --git a/src/dstr-binding/default/cls-decl-gen-meth-static.template b/src/dstr-binding/default/cls-decl-gen-meth-static.template index 422369c017..7fe1a43bd1 100644 --- a/src/dstr-binding/default/cls-decl-gen-meth-static.template +++ b/src/dstr-binding/default/cls-decl-gen-meth-static.template @@ -68,4 +68,4 @@ class C { }; C.method(/*{ vals }*/).next(); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/cls-decl-gen-meth.template b/src/dstr-binding/default/cls-decl-gen-meth.template index cfe3af0a02..73fbf2c3a9 100644 --- a/src/dstr-binding/default/cls-decl-gen-meth.template +++ b/src/dstr-binding/default/cls-decl-gen-meth.template @@ -68,4 +68,4 @@ class C { }; new C().method(/*{ vals }*/).next(); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/cls-decl-meth-static.template b/src/dstr-binding/default/cls-decl-meth-static.template index 4ca18661ab..40197a50f0 100644 --- a/src/dstr-binding/default/cls-decl-meth-static.template +++ b/src/dstr-binding/default/cls-decl-meth-static.template @@ -66,4 +66,4 @@ class C { }; C.method(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/cls-decl-meth.template b/src/dstr-binding/default/cls-decl-meth.template index 5fe49ac0a9..29fdbcffea 100644 --- a/src/dstr-binding/default/cls-decl-meth.template +++ b/src/dstr-binding/default/cls-decl-meth.template @@ -66,4 +66,4 @@ class C { }; new C().method(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/cls-expr-gen-meth-static.template b/src/dstr-binding/default/cls-expr-gen-meth-static.template index 54bbaa3f75..847c11f3c7 100644 --- a/src/dstr-binding/default/cls-expr-gen-meth-static.template +++ b/src/dstr-binding/default/cls-expr-gen-meth-static.template @@ -70,4 +70,4 @@ var C = class { }; C.method(/*{ vals }*/).next(); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/cls-expr-gen-meth.template b/src/dstr-binding/default/cls-expr-gen-meth.template index e2d5e9c6c0..cf62b3a5d9 100644 --- a/src/dstr-binding/default/cls-expr-gen-meth.template +++ b/src/dstr-binding/default/cls-expr-gen-meth.template @@ -70,4 +70,4 @@ var C = class { }; new C().method(/*{ vals }*/).next(); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/cls-expr-meth-static.template b/src/dstr-binding/default/cls-expr-meth-static.template index 45aeb8c4d3..d8e8b9841a 100644 --- a/src/dstr-binding/default/cls-expr-meth-static.template +++ b/src/dstr-binding/default/cls-expr-meth-static.template @@ -67,4 +67,4 @@ var C = class { }; C.method(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/cls-expr-meth.template b/src/dstr-binding/default/cls-expr-meth.template index e982cc9533..fd9b1075d4 100644 --- a/src/dstr-binding/default/cls-expr-meth.template +++ b/src/dstr-binding/default/cls-expr-meth.template @@ -67,4 +67,4 @@ var C = class { }; new C().method(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/src/dstr-binding/default/func-decl.template b/src/dstr-binding/default/func-decl.template index 8351735dbf..9565daf6cf 100644 --- a/src/dstr-binding/default/func-decl.template +++ b/src/dstr-binding/default/func-decl.template @@ -45,4 +45,4 @@ function f(/*{ elems }*/) { callCount = callCount + 1; }; f(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/src/dstr-binding/default/func-expr.template b/src/dstr-binding/default/func-expr.template index 6e562cc015..a48fb7c4c7 100644 --- a/src/dstr-binding/default/func-expr.template +++ b/src/dstr-binding/default/func-expr.template @@ -46,4 +46,4 @@ f = function(/*{ elems }*/) { }; f(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/src/dstr-binding/default/gen-func-decl.template b/src/dstr-binding/default/gen-func-decl.template index 829d97587c..8e9b6dea02 100644 --- a/src/dstr-binding/default/gen-func-decl.template +++ b/src/dstr-binding/default/gen-func-decl.template @@ -44,4 +44,4 @@ function* f(/*{ elems }*/) { callCount = callCount + 1; }; f(/*{ vals }*/).next(); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/src/dstr-binding/default/gen-func-expr.template b/src/dstr-binding/default/gen-func-expr.template index eb0b02239b..8292448a6e 100644 --- a/src/dstr-binding/default/gen-func-expr.template +++ b/src/dstr-binding/default/gen-func-expr.template @@ -46,4 +46,4 @@ f = function*(/*{ elems }*/) { }; f(/*{ vals }*/).next(); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/src/dstr-binding/default/gen-meth.template b/src/dstr-binding/default/gen-meth.template index 7f4d5f3cda..bd4e9938ef 100644 --- a/src/dstr-binding/default/gen-meth.template +++ b/src/dstr-binding/default/gen-meth.template @@ -52,4 +52,4 @@ var obj = { }; obj.method(/*{ vals }*/).next(); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'generator method invoked exactly once'); diff --git a/src/dstr-binding/default/meth.template b/src/dstr-binding/default/meth.template index 7814d8155e..675a81770f 100644 --- a/src/dstr-binding/default/meth.template +++ b/src/dstr-binding/default/meth.template @@ -49,4 +49,4 @@ var obj = { }; obj.method(/*{ vals }*/); -assert.sameValue(callCount, 1); +assert.sameValue(callCount, 1, 'method invoked exactly once');