swiftlang/swift

[SR-1717] Force -module-name "main" for %target-run-simple-swift

开放

#44,326 创建于 2016年6月9日

 (0 条评论) (0 个反应) (0 位负责人)Swift (10,719 个派生)batch import
buggood first issue

仓库指标

星标
 (69,989 个星标)
PR 合并指标
 (平均合并 8天 17小时) (30 天内合并 510 个 PR)

描述

Previous ID SR-1717
Radar None
Original Reporter @harlanhaskins
Type Bug
Votes 0
Component/s
Labels Bug, StarterBug, Test
Assignee None
Priority Medium

md5: 88bb4e4d7a2dac50fea1f7404c34a64a

Issue Description:

When running tests in the interpreter, there are lots of tests that fail because they're implicitly relying on the module name being the binary name.

For example, in Optionals.swift, line 379, we expect an optional to print as "Optional(Optional.TestNoString)", but it comes in as "Optional(main.TestNoString)" because the module is set to main in the interpreter.

The module should just always be main when running tests.

贡献者指南