Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
bytes, strings: Compare tests do not modify input alignments #26129
Currently there are no tests that vary the alignment of Compare arguments. Since Compare is written in assembly on most platforms (in internal/bytealg) we should be testing different input alignments. This change modifies TestCompare to vary the alignment of the second argument of Compare. Updates #26129 Change-Id: I4c30a5adf96a41225df748675f4e9beea413b35c Reviewed-on: https://go-review.googlesource.com/c/122536 Reviewed-by: Lotus Fenn <firstname.lastname@example.org> Reviewed-by: Ian Lance Taylor <email@example.com> Run-TryBot: Ian Lance Taylor <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>
@mundaym - The Compare function in
It even has a note from @rsc saying -
Would you still want to test unaligned input for strings/compare_test.go ?