[modules] Add tests for empty imports.

R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2369133002
Cr-Commit-Position: refs/heads/master@{#39739}
This commit is contained in:
neis 2016-09-26 11:55:48 -07:00 committed by Commit bot
parent 550e37296c
commit 0614eb5471
6 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// MODULE
import "modules-skip-empty-import.js";
import {counter} from "modules-skip-empty-import-aux.js";
assertEquals(1, counter);

View File

@ -0,0 +1,9 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// MODULE
import {} from "modules-skip-empty-import.js";
import {counter} from "modules-skip-empty-import-aux.js";
assertEquals(1, counter);

View File

@ -0,0 +1,9 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// MODULE
export {} from "modules-skip-empty-import.js";
import {counter} from "modules-skip-empty-import-aux.js";
assertEquals(1, counter);

View File

@ -0,0 +1,11 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// MODULE
import "modules-skip-empty-import.js";
import {} from "modules-skip-empty-import.js";
export {} from "modules-skip-empty-import.js";
import {counter} from "modules-skip-empty-import-aux.js";
assertEquals(1, counter);

View File

@ -0,0 +1,6 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export let counter = 0;
export function incr() { counter++ };

View File

@ -0,0 +1,6 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {incr} from "modules-skip-empty-import-aux.js";
incr();