All Versions
Latest Version
Avg Release Cycle
48 days
Latest Release
1367 days ago

Changelog History
Page 1

  • v1.7.0 Changes

    July 19, 2020

    🆕 New features:

    • 🆕 new (*td.T).RunAssertRequire function. Useful to avoid boilerplate code:

      t.RunAssertRequire("GetAge", func (assert *td.T, require *td.T) { age, err := GetAge("Bob") require.CmpNoError(err) assert.Cmp(age, 42) })

    • 🆕 new tdhttp.TestAPI method Or(), useful to debug a test failure:

      ta.Get("/person/42", "Accept", "application/json"). CmpJSONBody(td.JSON({"id": $1, "name": "Bob"}, td.NotZero())). Or(func (body string) { t.Logf("received unexpected body: <%s>", body) })

    📚 see the Or() documentation as the passed function can have a much more complex signature. It is inspired by Test::Mojo or() method and allows to easily inspect the response of the requested API when the checks fail.

    🛠 Fixes:

    • ✅ #101 → some data recursion cases were not correctly handled (reported and tested by @stewi1014);
    • some panics due to the user misbehavior were not properly red-colored;
    • ✅ (*td.T).Run: t.Config is now copied instead of shared before using it in sub-func;
    • ✏️ typos in doc.


  • v1.6.0 Changes

    May 31, 2020

    🔄 Changes:

    • ✅ td.TestingFT interface is deprecated (but still usable) and superseded by testing.TB standard one: it allows to work with *testing.B instances as well (or any other type implementing testing.TB);
    • ✅ (*td.T).RunT() is deprecated (but still usable) and superseded by (*td.T).Run() which now delegates to td.T.TB if it implements a Run() method with the following signature:

      (X) Run(string, func(X)) bool

    💥 Breaking changes:

    • ✅ as td.TestingFT interface is now an alias on testing.TB, it does not contain Run(string, func (*testing.T)) bool anymore;
    • it is quite unlikely that (*td.T).Run(string, func (*testing.T)) method is used, but if it is, all calls have to be replaced by (*td.T).Run(string, func (*td.T)) like in:

      tt.Run("my_test", func (tt *td.T) { t := tt.TB.(testing.T) ...})

    ✅ note that even though (*td.T).RunT() is deprecated, it still works as expected.

  • v1.5.0 Changes

    May 17, 2020

    🆕 New features:

    • 🆕 new Flatten function: useful to flatten non interface{} slices in Set, Bag arguments (but not only, read the doc);
    • ✅ panic messages due to user misuse of go-testdeep functions/methods are now red colored to help her/him to focus on her/his mistake and not think go-testdeep failed shamefully;
    • 👀 delay colors initialization to the first use. So colors can now be disabled in golang playgroung. See the corresponding FAQ point;
    • ⚡️ optimize some type retrievals.

    🛠 Fix:

    • forbid Isa(nil) because it is a nonsense and so avoid a deep panic.

    🆕 New FAQ entries:

    Enjoy and do not forget to star!

  • v1.4.0 Changes

    April 11, 2020

    🆕 New features:

    • 📦 tdhttp package (aka HTTP API tester) enhanced and fully documented;
    • 🆕 new Delay operator;
    • ✅ Contains operator reworked, smarter and []byte specifically handled;
    • ✅ String, HasPrefix and HasSuffix operators now operate on []byte too.

    🛠 Fixes:

    • anchor feature on 32 bits platforms;
    • ✏️ missing comments + typos.

    Enjoy, but at home! ;)

  • v1.3.0 Changes

    February 29, 2020

    📦 Package is deprecated, it is recommended to use in new code.

    ✅ is still usable so the compatibility is preserved.

    ✅ The only breaking change is the disappearance of testdeep.DefaultContextConfig. It should be replaced by td.DefaultContextConfig and so the go-testdeep import line should be changed (at least "" should be added).

    ✅ To summarize: migration to is not needed, only recommended, except if testdeep.DefaultContextConfig is used.

    To migrate:

    import ""… testdeep.DefaultContextConfig = testdeep.ContextConfig{…} testdeep.Cmp(…)

    📦 or with "td" package alias:

    import td ""
    td.DefaultContextConfig = td.ContextConfig{…}

    👀 simply do (see import line changes):

    import ""
    td.DefaultContextConfig = td.ContextConfig{…}

    👀 See the FAQ point for details about this migration.

    👀 And still, do not forget to visit and open an issue if something seems to be missing or not clear.

    ✅ Happy testing!

  • v1.2.0 Changes

    February 13, 2020

    🆕 New features:

    ✅ Synopsis revisited (again)!

    ✅ Enjoy powerful testing!

  • v1.1.2 Changes

    November 18, 2019

    🆕 New features:

    • JSON expected by JSON, SubJSONOf and SuperJSONOf operators can now contain comments (/* … */ or // …) and some simple operators can directly be embedded in JSON, as $^NotEmpty for example;
    • 🆕 New SubJSONOf & SuperJSONOf operators;
    • ✅ In case of error, JSON operator no longer truncates its JSON expected parameter in error message, but dumps all the operators involved using beautiful indented comments;
    • ✅ Add Assert() *T, Require() *T and AssertRequire() (*T, *T).

    ✅ Synopsis revisited!

    ✅ Enjoy powerful API testing!

  • v1.1.1 Changes

    November 03, 2019

    🆕 News:

    🆕 New features:

  • v1.1.0 Changes

    July 07, 2019

    🆕 New features:

    • 👀 introducing UseEqual feature to allow an objet to handle its comparison. See T.UseEqual and ContextConfig.UseEqual for details;
    • ✅ tdhttp.NewRequest(), tdhttp.NewJSONRequest() and tdhttp.NewXMLRequest() now accept headers definition;
    • ✅ Test name now colored in error reports;
    • Missing/Extra summaries show the number of involved items/keys;
    • Extra & missing maps items are now sorted;
    • ✅ Cmp function/method now replaces CmpDeeply (still available for backward compatibility);
    • ➕ Add new Keys and Values operators;
    • ✅ Code & Smuggle operators explicitly refuse variadic functions (and so avoid uncontrolled runtime panic).

    💥 Breaking changes:

    🐛 Bugs fixes:

    • 🛠 Fix a bug when compared slices have the same backend array.


  • v1.0.8 Changes

    January 14, 2019