All Versions
Latest Version
Avg Release Cycle
48 days
Latest Release
926 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