2 ms·
It depends on how you read the code. Equals is the singular and would read as "I assert A equals B". Equal is the plural and would read as " I assert A and B a
by stonemetal 16y ago
It depends on how you read the code. Equals is the singular and would read as "I assert A equals B". Equal is the plural and would read as " I assert A and B are equal". I tend to think the second phrase, but both are correct from an English standpoint.
- jonafato 16y agoThis is a nitpick, but "A equals B" uses the verb "equals", and "A and B are equal" uses the adjective "equal", describing a state of being. That said, reading code like English would probably suggest something like assertEqual(A,B) or A.assertEquals(B). At the end of the day, it's all just what looks best to you.