Skip to content

Commit ede5aa3

Browse files
committed
Remove test that depends on Swift.Int metadata, which isn't around.
The objectFuture test is better anyway.
1 parent 4fb5f05 commit ede5aa3

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

unittests/runtime/TaskFuture.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -120,39 +120,6 @@ static TestObject *allocTestObject(size_t *addr, size_t value) {
120120
return result;
121121
}
122122

123-
TEST(TaskFutureTest, intFuture) {
124-
auto createdExecutor = createFakeExecutor(1234);
125-
bool hasRun = false;
126-
127-
withFutureTask<intptr_t>(
128-
reinterpret_cast<const Metadata *>(&METADATA_SYM(Si)), 42,
129-
[&](AsyncTask *task, ExecutorRef executor,
130-
FutureContext<intptr_t> *context) {
131-
// The storage should be what we initialized it to earlier.
132-
EXPECT_EQ(42, context->getStorage());
133-
134-
// The error storage should have been cleared out for us.
135-
EXPECT_EQ(nullptr, context->errorResult);
136-
137-
// Store something in the future.
138-
context->getStorage() = 17;
139-
140-
hasRun = true;
141-
}, [&](AsyncTask *task) {
142-
// Run the task, which should fill in the future.
143-
EXPECT_FALSE(hasRun);
144-
task->run(createdExecutor);
145-
EXPECT_TRUE(hasRun);
146-
147-
// "Wait" for the future, which must have completed by now.
148-
auto waitResult = swift_task_future_wait(task, nullptr);
149-
EXPECT_EQ(TaskFutureWaitResult::Success, waitResult.kind);
150-
151-
// Make sure we got the result value we expect.
152-
EXPECT_EQ(17, *reinterpret_cast<intptr_t *>(waitResult.storage));
153-
});
154-
}
155-
156123
TEST(TaskFutureTest, objectFuture) {
157124
auto createdExecutor = createFakeExecutor(1234);
158125
bool hasRun = false;

0 commit comments

Comments
 (0)