@@ -16,7 +16,7 @@ import StdlibUnittest
1616
1717func checkAssumeMainActor( echo: MainActorEcho ) /* synchronous! */ {
1818 // Echo.get("any") // error: main actor isolated, cannot perform async call here
19- _assumeOnMainActorExecutor {
19+ assumeOnMainActorExecutor {
2020 let input = " example "
2121 let got = echo. get ( input)
2222 precondition ( got == " example " , " Expected echo to match \( input) " )
@@ -40,7 +40,7 @@ actor MainFriend {
4040
4141func checkAssumeSomeone( someone: Someone ) /* synchronous */ {
4242 // someone.something // can't access, would need a hop but we can't
43- _assumeOnActorExecutor ( someone) { someone in
43+ assumeOnActorExecutor ( someone) { someone in
4444 let something = someone. something
4545 let expected = " isolated something "
4646 precondition ( something == expected, " expected ' \( expected) ', got: \( something) " )
@@ -103,45 +103,45 @@ final class MainActorEcho {
103103 if #available( SwiftStdlib 5 . 9 , * ) {
104104 // === MainActor --------------------------------------------------------
105105
106- tests. test ( " _assumeOnMainActorExecutor : assume the main executor, from 'main() async'" ) {
106+ tests. test ( " assumeOnMainActorExecutor : assume the main executor, from 'main() async'" ) {
107107 await checkAssumeMainActor ( echo: echo)
108108 }
109109
110- tests. test ( " _assumeOnMainActorExecutor : assume the main executor, from MainActor method" ) {
110+ tests. test ( " assumeOnMainActorExecutor : assume the main executor, from MainActor method" ) {
111111 await mainActorCallCheck ( echo: echo)
112112 }
113113
114- tests. test ( " _assumeOnMainActorExecutor : assume the main executor, from actor on MainActor executor" ) {
114+ tests. test ( " assumeOnMainActorExecutor : assume the main executor, from actor on MainActor executor" ) {
115115 await MainFriend ( ) . callCheck ( echo: echo)
116116 }
117117
118- tests. test ( " _assumeOnMainActorExecutor : wrongly assume the main executor, from actor on other executor" ) {
118+ tests. test ( " assumeOnMainActorExecutor : wrongly assume the main executor, from actor on other executor" ) {
119119 expectCrashLater ( withMessage: " Incorrect actor executor assumption; Expected 'MainActor' executor. " )
120120 await Someone ( ) . callCheckMainActor ( echo: echo)
121121 }
122122
123123 // === some Actor -------------------------------------------------------
124124
125125 let someone = Someone ( )
126- tests. test ( " _assumeOnActorExecutor : wrongly assume someone's executor, from 'main() async'" ) {
126+ tests. test ( " assumeOnActorExecutor : wrongly assume someone's executor, from 'main() async'" ) {
127127 expectCrashLater ( withMessage: " Incorrect actor executor assumption; Expected same executor as a.Someone. " )
128128 checkAssumeSomeone ( someone: someone)
129129 }
130130
131- tests. test ( " _assumeOnActorExecutor : wrongly assume someone's executor, from MainActor method" ) {
131+ tests. test ( " assumeOnActorExecutor : wrongly assume someone's executor, from MainActor method" ) {
132132 expectCrashLater ( withMessage: " Incorrect actor executor assumption; Expected same executor as a.Someone. " )
133133 checkAssumeSomeone ( someone: someone)
134134 }
135135
136- tests. test ( " _assumeOnActorExecutor : assume someone's executor, from Someone" ) {
136+ tests. test ( " assumeOnActorExecutor : assume someone's executor, from Someone" ) {
137137 await someone. callCheckSomeone ( )
138138 }
139139
140- tests. test ( " _assumeOnActorExecutor : assume someone's executor, from actor on the Someone.unownedExecutor" ) {
140+ tests. test ( " assumeOnActorExecutor : assume someone's executor, from actor on the Someone.unownedExecutor" ) {
141141 await SomeonesFriend ( someone: someone) . callCheckSomeone ( )
142142 }
143143
144- tests. test ( " _assumeOnActorExecutor : wrongly assume the main executor, from actor on other executor" ) {
144+ tests. test ( " assumeOnActorExecutor : wrongly assume the main executor, from actor on other executor" ) {
145145 expectCrashLater ( withMessage: " Incorrect actor executor assumption; Expected same executor as a.Someone. " )
146146 await CompleteStranger ( someone: someone) . callCheckSomeone ( )
147147 }
0 commit comments