Files
swift-mirror/test/Runtime/crash_without_backtrace.swift
Saleem Abdulrasool b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00

24 lines
534 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -o %t/out
// RUN: not --crash %t/out 2>&1 | %FileCheck %s
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=ios
// UNSUPPORTED: OS=tvos
// REQUIRES: OS=macosx
// REQUIRES: swift_stdlib_no_asserts
// REQUIRES: executable_test
// This file just causes a crash in the runtime to check whether or not a stack
// trace is produced from the runtime.
// CHECK-NOT: Current stack trace:
import Swift
func foo() -> Int {
return UnsafePointer<Int>(bitPattern: 0)!.pointee
}
foo()