Files
swift-mirror/validation-test/Evolution/test_backward_deploy_struct.swift
Saleem Abdulrasool 01cf8a8dfc tests: disable backward deployment tests on Windows
PE/COFF does not support weak linking semantics.  Disable the tests
until we can emulate the required behaviour.  This will allow us to
enable running the validation test suite on Windows in the mean time.
2019-06-10 17:05:56 -07:00

53 lines
952 B
Swift

// RUN: %target-resilience-test --backward-deployment
// REQUIRES: executable_test
// Use swift-version 4.
// UNSUPPORTED: swift_test_mode_optimize_none_with_implicit_dynamic
// SR-10913
// UNSUPPORTED: OS=windows-msvc
import StdlibUnittest
import backward_deploy_struct
var BackwardDeployStructTest = TestSuite("BackwardDeployStruct")
BackwardDeployStructTest.test("ResilientStruct") {
if getVersion() == 1 {
var s = ResilientStruct()
s.fn(s.storedProp)
s.storedProp = 1
s.storedProp += 1
s.fn(s.computedProp)
s.computedProp = 1
s.computedProp += 1
s.fn(s[0])
s[0] = 1
s[0] += 1
}
}
BackwardDeployStructTest.test("FixedLayoutStruct") {
if getVersion() == 1 {
var s = FixedLayoutStruct()
s.fn(s.storedProp)
s.storedProp = 1
s.storedProp += 1
s.fn(s.computedProp)
s.computedProp = 1
s.computedProp += 1
s.fn(s[0])
s[0] = 1
s[0] += 1
}
}
runAllTests()