mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Renamed UnitTest to FunctionTest. FunctionTests are now instantiated once as global objects--with their names and the code they are to run--at which time they are stored by name in a global registry. Moved the types to the SIL library. Together, these changes enable defining unit tests in the source file containing the code to be tested.
23 lines
983 B
Plaintext
23 lines
983 B
Plaintext
// RUN: %target-sil-opt -test-runner %s 2>&1 | %FileCheck %s
|
|
|
|
// CHECK: begin running test 1 of {{[^,]+}} on last_uses_merge_points: dump-function
|
|
// CHECK: [[REGISTER_3:%[^,]+]] = tuple ()
|
|
// CHECK: return [[REGISTER_3]]
|
|
// CHECK: end running test 1 of {{[^,]+}} on last_uses_merge_points: dump-function
|
|
// CHECK: begin running test 2 of {{[^,]+}} on last_uses_merge_points: pruned-liveness-boundary-with-list-of-last-users-insertion-points
|
|
// CHECK: [[REGISTER_3]] = tuple ()
|
|
// CHECK: end running test 2 of {{[^,]+}} on last_uses_merge_points: pruned-liveness-boundary-with-list-of-last-users-insertion-points
|
|
sil [ossa] @last_uses_merge_points : $@convention(thin) () -> () {
|
|
entry:
|
|
test_specification "dump-function"
|
|
test_specification "pruned-liveness-boundary-with-list-of-last-users-insertion-points @block[1].instruction[0] @block[2].instruction[0]"
|
|
cond_br undef, left, right
|
|
left:
|
|
br bottom
|
|
right:
|
|
br bottom
|
|
bottom:
|
|
%retval = tuple ()
|
|
return %retval : $()
|
|
}
|