Files
swift-mirror/test/Serialization/load-invalid.swift
Harlan Haskins 150ad99457 [ModuleInterfaces] Replace 'module file' with 'compiled module'
...only in diagnostics. And make the tests pass.

rdar://49359734
2019-04-11 18:05:09 -07:00

19 lines
807 B
Swift

// RUN: %empty-directory(%t)
// RUN: touch %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
// RUN: echo -n 'a' > %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
// RUN: echo -n 'abcd' > %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
// RUN: echo -n 'abcde' > %t/new_module.swiftmodule
// RUN: %target-swift-frontend %s -typecheck -I %t -verify -show-diagnostics-after-fatal
import new_module // expected-error{{malformed compiled module}}
// malformed module files produce an empty module to avoid further errors.
new_module.foo() // expected-error {{module 'new_module' has no member named 'foo'}}