<commit_before>package trace

import (
	"testing"

	"github.com/cosiner/gohper/errors"
	"github.com/cosiner/gohper/testing2"
)

func TestTrace(t *testing.T) {
	tt := testing2.Wrap(t)
	tt.Nil(Trace(nil))

	var e error = errors.Err("Error")

	e2 := Trace(e)
	es := "trace_test.go:16:" + e.Error()
	tt.Eq(es, e2.Error())

	e2 = Trace(e2)
	tt.Eq(es, e2.Error())

	TraceEnabled = false
	e2 = Trace(e)
	tt.Eq(e2, e)
}<commit_msg>fixed caller pos<commit_after>package trace

import (
	"testing"

	"github.com/cosiner/gohper/errors"
	"github.com/cosiner/gohper/testing2"
)

func TestTrace(t *testing.T) {
	tt := testing2.Wrap(t)
	tt.Nil(Trace(nil))

	var e error = errors.Err("Error")

	e2 := Trace(e)
	es := "trace/trace_test.go:16:" + e.Error()
	tt.Eq(es, e2.Error())

	e2 = Trace(e2)
	tt.Eq(es, e2.Error())

	TraceEnabled = false
	e2 = Trace(e)
	tt.Eq(e2, e)
}
{'fraction_non_alphanumeric': 0.19064327485380117, 'fraction_numerical': 0.025730994152046785, 'mean_word_length': 3.9767441860465116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2981127', 'n_tokens_mistral': 399, 'n_tokens_neox': 385, 'n_words': 68}