Age | Commit message (Collapse) | Author |
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2320808
Change-Id: I14b6ad6891b5023adcbb19c4f53bab9b8dd9eea3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2320808
Change-Id: I6ba5921fc86e3fcb4fb47823cdd9f8332f16d496
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2320808
Change-Id: I5e8775461c1fa83cc32d058728751e9c13dde03f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Test: N/A
Change-Id: I750271ef55e923645a03a114c35ba385a77e7e6f
|
|
If the string has many characters that require escape sequences to print,
then we need to take that into consideration and avoid byte-by-byte diffing.
Co-authored-by: Damien Neil <neild@users.noreply.github.com>
|
|
* Run tests on Go 1.19
* Format comment
Finish the rest of the work for https://github.com/google/go-cmp/pull/304
Co-authored-by: Damien Neil <neild@users.noreply.github.com>
|
|
The value.TypeString function is what the rest of the package uses
and is slightly cleaner than using reflect.Type.String.
Updates #305
Co-authored-by: Damien Neil <neild@users.noreply.github.com>
|
|
Co-authored-by: Damien Neil <neild@users.noreply.github.com>
|
|
|
|
This allows the GoDoc to take advantage of new markup syntax
introduced in Go 1.19. This does not require that our minimum
supported version be bumped to Go 1.19 since the pkgsite renders
our godoc regardless of supported Go version.
|
|
Now that Go 1.13 is the minimum version, we can use the reflect.Value.IsZero
method instead of our own internal/value.IsZero function.
Interestingly, our IsZero function pre-dates the IsZero method,
but fortunately has the exact same semantics, since both are targetting
semantics defined by the Go language specification.
|
|
|
|
Versions older than Go 1.13 are no longer in use. Remove unnecessary
dependencies.
|
|
If a slice of bytes is mostly text, format them as text
instead of as []byte literal with hexadecimal digits.
Avoid always printing the type. This is technically invalid Go code,
but is unnecessary in many cases since the type is inferred
from the parent concrete type.
Fixes #272
|
|
When printing a pointer, only elide the type for unnamed pointers.
Otherwise, we can run into situations where named and unnamed pointers
format the same way in indistinguishable ways.
When printing an interview, never skip the interface type.
Whether we skip printing the type should be determined by the
parent containers, and not locally determined.
For examples, interface values within a struct, slice, or map
will always be elided since they can be inferred.
|
|
am: a3f99847d9 -s ours am: 8dab502b73 -s ours am: 1d7f911f63 -s ours am: 963280ff1c -s ours
am skip reason: Merged-In Id15da777ea64e396fbc908abc8565b9639f44f1d with SHA-1 71258e7197 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/go-cmp/+/17544764
Change-Id: I13baf7eaf32b68a539d4a4f1387858431ceb9a80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: a3f99847d9 -s ours am: 8dab502b73 -s ours am: 1d7f911f63 -s ours
am skip reason: Merged-In Id15da777ea64e396fbc908abc8565b9639f44f1d with SHA-1 71258e7197 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/go-cmp/+/17544764
Change-Id: Ie5df2a575ae4339db8837a041c76f92c87145565
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: a3f99847d9 -s ours am: 8dab502b73 -s ours am: a9459a46c6 -s ours
am skip reason: Merged-In Id15da777ea64e396fbc908abc8565b9639f44f1d with SHA-1 71258e7197 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/go-cmp/+/17544764
Change-Id: I5881c12c7144fcedbbe0aac677037666e23bc9c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: a3f99847d9 -s ours am: 8dab502b73 -s ours
am skip reason: Merged-In Id15da777ea64e396fbc908abc8565b9639f44f1d with SHA-1 71258e7197 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/go-cmp/+/17544764
Change-Id: I3472bf00e696d70cbe06809dcd29ef029dc85f0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: a3f99847d9 -s ours am: 8dab502b73 -s ours
am skip reason: Merged-In Id15da777ea64e396fbc908abc8565b9639f44f1d with SHA-1 71258e7197 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/go-cmp/+/17544764
Change-Id: I2ec081c77cc1f5d3ae2e33ae93d42bd14739f9a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am: a3f99847d9 -s ours
am skip reason: Merged-In Id15da777ea64e396fbc908abc8565b9639f44f1d with SHA-1 71258e7197 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/go-cmp/+/17544764
Change-Id: I93ea5e61fbda01e65992334d4ceeef31c8ab9d5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
am skip reason: Merged-In Id15da777ea64e396fbc908abc8565b9639f44f1d with SHA-1 71258e7197 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/go-cmp/+/17544764
Change-Id: Ic62e88a0e2557e560b00e24d7faf221f55dd3a11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Bug: 226662282
Merged-In: Id15da777ea64e396fbc908abc8565b9639f44f1d
Change-Id: Id029ff234c682036ea2be41c11ed81037efe2b8e
|
|
b0e3dfe0c1 am: 5aa249cfd5
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2047006
Change-Id: I50ac1b4c46fcaca280fe87ed523aa236d8086ef2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2047006
Change-Id: I9b4ee2c5989aa7899679b693dc4c9f9b998b5e63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2047006
Change-Id: Ic09ad3fc35baab44c11d57564cca2e6316942f80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2047006
Change-Id: Iab1e06b1a1a985b3a12cf5e626250678bf1fb825
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2047006
Change-Id: Id15da777ea64e396fbc908abc8565b9639f44f1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/2047006
Change-Id: I2bbabb46fbdcb32817f7842f50c574404f40dffe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Change-Id: Ia844c88b15306dc4a38fd6649b8734841ad1c666
|
|
|
|
Starting with Go 1.17, //go:build lines are preferred over // +build
lines, see https://golang.org/doc/go1.17#build-lines and
https://golang.org/design/draft-gobuild for details.
This change was generated by running Go 1.17 go fmt ./... which
automatically adds //go:build lines based on the existing // +build
lines.
Also update the corresponding GitHub action to use Go 1.17 gofmt.
|
|
Now that Go 1.11 is the minimally supported version,
we can drop some local hacks to work around bugs in
reflect that were present in Go1.9.
|
|
|
|
The original threshold of 64 was chosen without much thought.
Lower it to 32 now that we have some concrete examples
that it is aesthetically better.
Co-authored-by: Damien Neil <neild@users.noreply.github.com>
|
|
See golang/go#33232.
|
|
Co-authored-by: Damien Neil <neild@users.noreply.github.com>
|
|
|
|
435f492b8e am: 69c354c47f
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1812316
Change-Id: I1ff484b18cf9c641bcfff96c2574cb2264fe0509
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1812316
Change-Id: I81226f94b4f34d8e5318e03acabe15a1b99c5c03
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1812316
Change-Id: Ia7196559f975f934aada4553c6826f793e35a5ba
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1812316
Change-Id: Ieff2f6beb01a0454bfbc06de6906d4bde89a87c3
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1812316
Change-Id: I1001c3fd4a8d99cb96cf22a3a929c5a5d3c9ab4c
|
|
Change-Id: I4f0817d7efa4a1d223643d89b511571c0ad144db
|
|
Some aggressive dependency checks flag the use of md5.
Switch to sha256 as it accomplishes the same purpose.
|
|
Fix textual printing of byte slices
|
|
There are two bugs being fixed:
1. The hueristic for whether a slice of byte looks like text
should check whether a rune IsPrint OR IsSpace, and not both.
Only a single rune (i.e., U+0020) ever satisfies both conditions.
Previously, it would print as:
MyBytes{0x68, 0x65, 0x6c, 0x6c, 0x6f}
and now it would now print as:
MyBytes(MyBytes("hello"))
2. If we're printing as string, then we should set skipType=true
since we already explicitly format the value with the type.
Previously, it would print as:
MyBytes(MyBytes("hello"))
and now it would now print as:
MyBytes("hello")
|
|
6c0eef7755
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1716978
Change-Id: I0550d20292ab0614383bfc691937456bfd988aec
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1716978
Change-Id: I8a07908cb3f9b4035f3c4d2a8b42942f2cf708db
|
|
Original change: https://android-review.googlesource.com/c/platform/external/go-cmp/+/1716978
Change-Id: I23984211bc122436aa1827b9df812f50bc63a0b2
|