From cf0b4e1f500a96f3e67ef6ee3de6f62615e8417a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Soul=C3=A9?= Date: Mon, 18 Jun 2018 11:09:40 +0200 Subject: [PATCH] Add doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime Soulé --- td_code.go | 2 ++ td_smuggle.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/td_code.go b/td_code.go index a3021b0a..a6a4617a 100644 --- a/td_code.go +++ b/td_code.go @@ -47,6 +47,8 @@ var _ TestDeep = &tdCode{} // confusion produced by output in case of failure. When the data // needs to be transformed before being compared again, Smuggle // operator should be used instead. +// +// TypeBehind method returns the reflect.Type of only parameter of "fn". func Code(fn interface{}) TestDeep { vfn := reflect.ValueOf(fn) diff --git a/td_smuggle.go b/td_smuggle.go index cb9b8af9..5eb3039d 100644 --- a/td_smuggle.go +++ b/td_smuggle.go @@ -135,6 +135,8 @@ var _ TestDeep = &tdSmuggle{} // The difference between Smuggle and Code operators is that Code is // used to do a final comparison while Smuggle transforms the data and // then steps down in favor of generic comparison process. +// +// TypeBehind method returns the reflect.Type of only parameter of "fn". func Smuggle(fn interface{}, expectedValue interface{}) TestDeep { vfn := reflect.ValueOf(fn)