| 1 |
// Copyright (c) 2018, Maxime Soulé |
| 2 |
// All rights reserved. |
| 3 |
// |
| 4 |
// This source code is licensed under the BSD-style license found in the |
| 5 |
// LICENSE file in the root directory of this source tree. |
| 6 |
|
| 7 |
// Package testdeep allows extremely flexible deep comparison. It is |
| 8 |
// built for testing. |
| 9 |
// |
| 10 |
// It is a go rewrite and adaptation of wonderful [Test::Deep] perl |
| 11 |
// module. |
| 12 |
// |
| 13 |
// In golang, comparing data structure is usually done using |
| 14 |
// [reflect.DeepEqual] or using a package that uses this function |
| 15 |
// behind the scene. |
| 16 |
// |
| 17 |
// This function works very well, but it is not flexible. Both |
| 18 |
// compared structures must match exactly. |
| 19 |
// |
| 20 |
// The purpose of go-testdeep is to do its best to introduce this |
| 21 |
// missing flexibility using ["operators"] when the expected value (or |
| 22 |
// one of its component) cannot be matched exactly. |
| 23 |
// |
| 24 |
// testdeep package should not be used in new code, even if it can for |
| 25 |
// backward compatibility reasons, but [td] package. |
| 26 |
// |
| 27 |
// All variables and types of testdeep package are aliases to |
| 28 |
// respectively functions and types of [td] package. They are only |
| 29 |
// here for compatibility purpose as |
| 30 |
// |
| 31 |
// import "github.com/maxatome/go-testdeep/td" |
| 32 |
// |
| 33 |
// should now be used, in preference of older, but still supported: |
| 34 |
// |
| 35 |
// import td "github.com/maxatome/go-testdeep" |
| 36 |
// |
| 37 |
// For easy HTTP API testing, see [tdhttp] package. |
| 38 |
// |
| 39 |
// For tests suites also just as easy, see [tdsuite] package. |
| 40 |
// |
| 41 |
// [Test::Deep]: https://metacpan.org/pod/Test::Deep |
| 42 |
// ["operators"]: https://go-testdeep.zetta.rocks/operators/ |
| 43 |
// [tdhttp]: https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdhttp |
| 44 |
// [tdsuite]: https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite |
| 45 |
package testdeep // import "github.com/maxatome/go-testdeep" |