From 425cee4cef059629fd5f13c871c2dac6f90e0ca9 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Thu, 20 Apr 2023 14:26:11 -0700 Subject: [PATCH] Split out checks for methods that throw Summary: I'm still not sure if there's an easier way to test throwing methods that work on both GitHub Actions and our internal build tooling (Since GitHub does throw at asserts, and our internal tools don't), but this way at least works. Each statement has to be contained in its own separate `try` because the first throwing method will cancel execution in the rest of the code block. This diff separates out each throwing test into its own `try` block Reviewed By: candance Differential Revision: D45147876 fbshipit-source-id: 95d587d5abe4a695b1ca1f76ebf3bda3984c6065 --- Tests/IGListSectionControllerTests.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/IGListSectionControllerTests.m b/Tests/IGListSectionControllerTests.m index 288c83af..6af5a007 100644 --- a/Tests/IGListSectionControllerTests.m +++ b/Tests/IGListSectionControllerTests.m @@ -35,6 +35,9 @@ @try { [sectionController cellForItemAtIndex:0]; + } @catch (NSException *exception) {} + + @try { [sectionController moveObjectFromIndex:0 toIndex:1]; } @catch (NSException *exception) {} }