OCMockitoSwift icon indicating copy to clipboard operation
OCMockitoSwift copied to clipboard

Add caller's filename and line number to the fail report

Open vladimir-bebeshko opened this issue 5 years ago • 0 comments

Hey, Aleksander! I've added file name and line number to the fail report of the test. Now it prints the actual line number, where the verify(mock) ... function is called, i.e.

failed: caught "HCGenericTestFailure", "/path/to/MyTests.swift:123: matcher error: Wanted but not invoked:
myMethod:ANYTHING withArguments:ANYTHING

Before the changes it used to always print OCMockitoSwiftAdapter.m:67 where the verifyCount() call is used to be.

Please, take a look, and merge it if you like.

I've run all the tests in the example before and after the changes. All passed.

Thanks! 😊

vladimir-bebeshko avatar Apr 04 '19 13:04 vladimir-bebeshko