The main issue with Rusts default assertions is that it assumes that whoever is authoring the code is also authoring/viewing tests. Here it is not so, and users have no idea what left and right refer to. A line clarifying which is which should always be added to the assertion of assert_eq!.
Sorry for getting back to this so late (notifications don't work and I forgot this existed)
Is there a reason random tests all have the same length? If those were to be random, then this is approvable.
The main issue with Rusts default assertions is that it assumes that whoever is authoring the code is also authoring/viewing tests. Here it is not so, and users have no idea what
left
andright
refer to. A line clarifying which is which should always be added to the assertion ofassert_eq!
..
Indeed, the example tests case were not calling the right function.
It is now fixed