test for Task (IDEA-CR-67803)

GitOrigin-RevId: 0bd9ff558ce894679693fa52d30e6619cb3a3789
This commit is contained in:
Alexey Kudravtsev
2020-10-20 13:27:42 +00:00
committed by intellij-monorepo-bot
parent 281cb6bd55
commit 25727968bd
@@ -1041,4 +1041,14 @@ public class ProgressIndicatorTest extends LightPlatformTestCase {
}
});
}
public void testTaskWithResultMustBeAbleToComputeException() throws Exception {
Exception result = ProgressManager.getInstance().run(new Task.WithResult<Exception, Exception>(null, "", true) {
@Override
protected Exception compute(@NotNull ProgressIndicator indicator) {
return new Exception("result");
}
});
assertEquals("result", result.getMessage());
}
}