theboocock / shunit2

Automatically exported from code.google.com/p/shunit2
0 stars 0 forks source link

Messages with spaces don't work with the macros #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running a test with a macro with spaces in the optional message results in 
invalid number of 
arguments errors.

Test:
${_ASSERT_EQUALS_} 'some msg' 'x' 'y'

Results:
ASSERT:_ASSERT_EQUALS_ failure
shunit2:ERROR assertEquals() requires two or three arguments; 4 given

The messages and arguments in macros need to be re-quoted.

Original issue reported on code.google.com by kate.war...@gtempaccount.com on 27 Oct 2008 at 10:28

GoogleCodeExporter commented 9 years ago
Fixed in CL# 250.

Unfortunately, due to how macros are implemented, the fix for this is an extra 
set of quoting around the 
arguments. Documented the requirement, and it is demonstrated in the unit tests.

Original comment by kate.war...@gtempaccount.com on 27 Oct 2008 at 6:31