From 18f1225570d704671b48191245fe3494f98fbb32 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Fri, 5 Oct 2018 10:33:48 -0400 Subject: [PATCH] Generate tests --- ...-braceless-eval-gtbndng-indirect-update-dflt.js | 7 ++++++- ...ed-if-braceless-eval-gtbndng-indirect-update.js | 14 +++++++++++++- .../usage/nested-if-braceless-returns-promise.js | 6 +++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update-dflt.js b/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update-dflt.js index fca96dd993..537bdd6011 100644 --- a/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update-dflt.js +++ b/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update-dflt.js @@ -34,4 +34,9 @@ info: | ---*/ -if (true) import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js'); +if (true) import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => { + + assert.sameValue(imported.default(), 1); + assert.sameValue(imported.default, 2); + +}).then($DONE, $DONE).catch($DONE); diff --git a/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update.js b/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update.js index be923cd678..fe09649d9b 100644 --- a/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update.js +++ b/test/language/module-code/dynamic-import/usage/nested-if-braceless-eval-gtbndng-indirect-update.js @@ -35,4 +35,16 @@ info: | ---*/ -if (true) import('./eval-gtbndng-indirect-update_FIXTURE.js'); +if (true) import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => { + + assert.sameValue(imported.x, 1); + + // This function is exposed on the global scope (instead of as an exported + // binding) in order to avoid possible false positives from assuming correct + // behavior of the semantics under test. + fnGlobalObject().test262update(); + + assert.sameValue(imported.x, 2); + + +}).then($DONE, $DONE).catch($DONE); diff --git a/test/language/module-code/dynamic-import/usage/nested-if-braceless-returns-promise.js b/test/language/module-code/dynamic-import/usage/nested-if-braceless-returns-promise.js index d4f9f98f5c..37710f3aad 100644 --- a/test/language/module-code/dynamic-import/usage/nested-if-braceless-returns-promise.js +++ b/test/language/module-code/dynamic-import/usage/nested-if-braceless-returns-promise.js @@ -22,4 +22,8 @@ info: | ---*/ -if (true) import('./dynamic-import-module_FIXTURE.js'); +if (true) import('./dynamic-import-module_FIXTURE.js').then(imported => { + + assert.sameValue(imported.x, 1); + +}).then($DONE, $DONE).catch($DONE);