-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
None
Per the summary, it is often convenient to write tests that assert both that a method returning StatusWith<T> succeeds and checks the value of the returned T. assertGet(StatusWith<T> swt) should ASSERT_OK(swt.getStatus()) and then return swt.getValue(), so that you can write:
ASSERT_EQUALS(someVal, unittest::assertGet(someStatusWithMethod())