pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel Add devel/go-cmp Version 0.4.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b87fb4684404
branches:  trunk
changeset: 428409:b87fb4684404
user:      nikita <nikita%pkgsrc.org@localhost>
date:      Mon Apr 27 17:15:22 2020 +0000

description:
Add devel/go-cmp Version 0.4.0

go-cmp is a package for equality of Go values.

This package is intended to be a more powerful and safer alternative
to reflect.DeepEqual for comparing whether two values are semantically
equal.

The primary features of cmp are:

- When the default behavior of equality does not suit the needs of the
  test, custom equality functions can override the equality
  operation. For example, an equality function may report floats as
  equal so long as they are within some tolerance of each other.

- Types that have an Equal method may use that method to determine
  equality. This allows package authors to determine the equality
  operation for the types that they define.

- If no custom equality functions are used and no Equal method is
  defined, equality is determined by recursively comparing the
  primitive kinds on both values, much like reflect.DeepEqual. Unlike
  reflect.DeepEqual, unexported fields are not compared by default;
  they result in panics unless suppressed by using an Ignore option
  (see cmpopts.IgnoreUnexported) or explicitly compared using the
  AllowUnexported option.

diffstat:

 devel/Makefile             |   3 +-
 devel/go-cmp/DESCR         |  24 +++++++++++++++++++
 devel/go-cmp/Makefile      |  19 +++++++++++++++
 devel/go-cmp/PLIST         |  56 ++++++++++++++++++++++++++++++++++++++++++++++
 devel/go-cmp/buildlink3.mk |  16 +++++++++++++
 devel/go-cmp/distinfo      |   6 ++++
 6 files changed, 123 insertions(+), 1 deletions(-)

diffs (158 lines):

diff -r e63a09ec2f76 -r b87fb4684404 devel/Makefile
--- a/devel/Makefile    Mon Apr 27 17:09:12 2020 +0000
+++ b/devel/Makefile    Mon Apr 27 17:15:22 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3112 2020/04/27 16:31:22 nikita Exp $
+# $NetBSD: Makefile,v 1.3113 2020/04/27 17:15:22 nikita Exp $
 #
 
 COMMENT=       Development utilities
@@ -385,6 +385,7 @@
 SUBDIR+=       go-cast
 SUBDIR+=       go-check
 SUBDIR+=       go-cli
+SUBDIR+=       go-cmp
 SUBDIR+=       go-cobra
 SUBDIR+=       go-colorable
 SUBDIR+=       go-colortext
diff -r e63a09ec2f76 -r b87fb4684404 devel/go-cmp/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/go-cmp/DESCR        Mon Apr 27 17:15:22 2020 +0000
@@ -0,0 +1,24 @@
+go-cmp is a package for equality of Go values.
+
+This package is intended to be a more powerful and safer alternative
+to reflect.DeepEqual for comparing whether two values are semantically
+equal.
+
+The primary features of cmp are:
+
+- When the default behavior of equality does not suit the needs of the
+  test, custom equality functions can override the equality
+  operation. For example, an equality function may report floats as
+  equal so long as they are within some tolerance of each other.
+
+- Types that have an Equal method may use that method to determine
+  equality. This allows package authors to determine the equality
+  operation for the types that they define.
+
+- If no custom equality functions are used and no Equal method is
+  defined, equality is determined by recursively comparing the
+  primitive kinds on both values, much like reflect.DeepEqual. Unlike
+  reflect.DeepEqual, unexported fields are not compared by default;
+  they result in panics unless suppressed by using an Ignore option
+  (see cmpopts.IgnoreUnexported) or explicitly compared using the
+  AllowUnexported option.
diff -r e63a09ec2f76 -r b87fb4684404 devel/go-cmp/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/go-cmp/Makefile     Mon Apr 27 17:15:22 2020 +0000
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1 2020/04/27 17:15:22 nikita Exp $
+
+DISTNAME=      go-cmp-0.4.0
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=google/}
+CATEGORIES=    devel
+GITHUB_PROJECT=        go-cmp
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/google/go-cmp
+COMMENT=       Package for comparing Go values in tests
+LICENSE=       modified-bsd
+
+GO_DIST_BASE=  ${DISTNAME}
+GO_SRCPATH=    github.com/google/go-cmp
+
+.include "../../devel/go-xerrors/buildlink3.mk"
+.include "../../lang/go/go-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r e63a09ec2f76 -r b87fb4684404 devel/go-cmp/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/go-cmp/PLIST        Mon Apr 27 17:15:22 2020 +0000
@@ -0,0 +1,56 @@
+@comment $NetBSD: PLIST,v 1.1 2020/04/27 17:15:22 nikita Exp $
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/cmpopts.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/diff.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/flags.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/function.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/testprotos.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/teststructs.a
+gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/value.a
+gopkg/src/github.com/google/go-cmp/CONTRIBUTING.md
+gopkg/src/github.com/google/go-cmp/LICENSE
+gopkg/src/github.com/google/go-cmp/README.md
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/equate.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/ignore.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/sort.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/util_test.go
+gopkg/src/github.com/google/go-cmp/cmp/cmpopts/xform.go
+gopkg/src/github.com/google/go-cmp/cmp/compare.go
+gopkg/src/github.com/google/go-cmp/cmp/compare_test.go
+gopkg/src/github.com/google/go-cmp/cmp/example_reporter_test.go
+gopkg/src/github.com/google/go-cmp/cmp/example_test.go
+gopkg/src/github.com/google/go-cmp/cmp/export_panic.go
+gopkg/src/github.com/google/go-cmp/cmp/export_unsafe.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/diff.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/diff/diff_test.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/flags/flags.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/function/func.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/function/func_test.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/testprotos/protos.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project1.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project2.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project3.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project4.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/structs.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/sort.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/sort_test.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/zero.go
+gopkg/src/github.com/google/go-cmp/cmp/internal/value/zero_test.go
+gopkg/src/github.com/google/go-cmp/cmp/options.go
+gopkg/src/github.com/google/go-cmp/cmp/options_test.go
+gopkg/src/github.com/google/go-cmp/cmp/path.go
+gopkg/src/github.com/google/go-cmp/cmp/report.go
+gopkg/src/github.com/google/go-cmp/cmp/report_compare.go
+gopkg/src/github.com/google/go-cmp/cmp/report_reflect.go
+gopkg/src/github.com/google/go-cmp/cmp/report_slices.go
+gopkg/src/github.com/google/go-cmp/cmp/report_text.go
+gopkg/src/github.com/google/go-cmp/cmp/report_value.go
+gopkg/src/github.com/google/go-cmp/go.mod
+gopkg/src/github.com/google/go-cmp/go.sum
diff -r e63a09ec2f76 -r b87fb4684404 devel/go-cmp/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/go-cmp/buildlink3.mk        Mon Apr 27 17:15:22 2020 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/04/27 17:15:22 nikita Exp $
+
+BUILDLINK_TREE+=       go-cmp
+
+.if !defined(GO_CMP_BUILDLINK3_MK)
+GO_CMP_BUILDLINK3_MK:=
+
+BUILDLINK_CONTENTS_FILTER.go-cmp=      ${EGREP} gopkg/
+BUILDLINK_DEPMETHOD.go-cmp?=           build
+
+BUILDLINK_API_DEPENDS.go-cmp+=         go-cmp>=0.4.0
+BUILDLINK_PKGSRCDIR.go-cmp?=           ../../devel/go-cmp
+
+.endif # GO_CMP_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -go-cmp
diff -r e63a09ec2f76 -r b87fb4684404 devel/go-cmp/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/go-cmp/distinfo     Mon Apr 27 17:15:22 2020 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2020/04/27 17:15:22 nikita Exp $
+
+SHA1 (go-cmp-0.4.0.tar.gz) = 9a75761c56d72ff0a50eccaa014f315811796a13
+RMD160 (go-cmp-0.4.0.tar.gz) = dbb7e95152e5bb674920901352bebe0ae0bdcd68
+SHA512 (go-cmp-0.4.0.tar.gz) = f848f5509189e14019eea56abde0e1fdf64a0de666b56270cfbd8832a656376273e3b71be556e0b637f69304c5b7099f1af4e069d6e025961dbafecf969e90ab
+Size (go-cmp-0.4.0.tar.gz) = 81600 bytes



Home | Main Index | Thread Index | Old Index