go-testdeep Cmp shortcuts

The Cmp function is the keystone of this package, but to make the writing of tests even easier, the family of Cmp* functions are provided and act as shortcuts. Using CmpStruct function, the previous example can be written as:

import (


func TestCreateRecord(t *testing.T) {
  before := time.Now().Truncate(time.Second)
  record, err := CreateRecord()

  if td.CmpNoError(t, err) {
    td.CmpStruct(t, record,
        Name: "Bob",
        Age:  23,
        "Id":        td.NotZero(),
        "CreatedAt": td.Between(before, time.Now()),
      "Newly created record")