Files
swift-mirror/validation-test/Evolution/test_function_change_transparent_body.swift
Slava Pestov 6798eea160 Evolution: Some of these tests pass with swift_test_mode_optimize_none_with_implicit_dynamic
The remaining failures still warrant investigation.
2019-06-11 00:54:32 -07:00

41 lines
752 B
Swift

// RUN: %target-resilience-test
// REQUIRES: executable_test
import StdlibUnittest
import function_change_transparent_body
var ChangeTransparentBodyTest = TestSuite("ChangeTransparentBody")
ChangeTransparentBodyTest.test("ChangeTransparentBody") {
#if BEFORE
expectEqual(0, getBuildVersion())
#else
expectEqual(1, getBuildVersion())
#endif
}
ChangeTransparentBodyTest.test("ChangeNonTransparentClosure") {
if getVersion() == 0 {
expectEqual(202, getFunction(2)(101))
} else {
expectEqual(101, getFunction(2)(101))
}
}
ChangeTransparentBodyTest.test("ChangeTransparentClosure") {
#if BEFORE
expectEqual(202, getTransparentFunction(2)(101))
#else
expectEqual(101, getTransparentFunction(2)(101))
#endif
}
runAllTests()