func (s *StackFrame) IsTest() bool {
	return isTest(s.FuncName, "Test") || isTest(s.FuncName, "Benchmark") || isTest(s.FuncName, "Example")
}
IsTest determines if the found function is a Test
package htest
import (
	"bytes"
	"fmt"
	"runtime"
	"strings"
	"unicode"
	"unicode/utf8"
	"github.com/fatih/color"
)
type StackFrames []*StackFrame
func Trace() (frames StackFrames) {
	for i := 0; ; i++ {
		pc, file, _, ok := runtime.Caller(i)
		if !ok {
			return frames
		}
		if file == "<autogenerated>" {
			continue
		}
		frame := NewStackFrame(pc)
		if frame != nil {
			frames = append(frames, frame)
		}
	}
}
func (frames StackFrames) String() string {
	var buf bytes.Buffer
	for _, frame := range frames {
		buf.WriteString(frame.String() + "\n\r\t\t\t")
	}
	return buf.String()
}
func (frames StackFrames) OnlyTests() (out StackFrames) {
	for _, frame := range frames {
		if frame.IsTest() {
			out = append(out, frame)
		}
	}
	return out
}
type StackFrame struct {
	PC       uintptr
	File     string
	FuncName string
	Package  string
	Line     int
}
func NewStackFrame(pc uintptr) *StackFrame {
	fn := runtime.FuncForPC(pc)
	if fn == nil {
		return nil
	}
	pkg, funcName := extractPackageAndLine(fn.Name())
	file, line := fn.FileLine(pc - 1)
	s := &StackFrame{
		PC:       pc,
		File:     file,
		Line:     line,
		Package:  pkg,
		FuncName: funcName,
	}
	return s
}
var pkgColor = color.New(color.Italic, color.FgHiBlack).SprintFunc()
var gray = color.New(color.FgHiBlack).SprintFunc()
var funcColor = color.New(color.Bold).SprintFunc()
var lineColor = color.New(color.Bold, color.FgHiBlue).SprintFunc()
func (s *StackFrame) String() string {
	return fmt.Sprintf("%s.%s:%s", pkgColor(s.Package), funcColor(s.FuncName), funcColor(s.Line))
}