(b *testing.B)
| 1733 | } |
| 1734 | |
| 1735 | func BenchmarkBindStruct(b *testing.B) { |
| 1736 | b.StopTimer() |
| 1737 | q1 := `INSERT INTO foo (a, b, c, d) VALUES (:name, :age, :first, :last)` |
| 1738 | type t struct { |
| 1739 | Name string |
| 1740 | Age int |
| 1741 | First string |
| 1742 | Last string |
| 1743 | } |
| 1744 | am := t{"Jason Moiron", 30, "Jason", "Moiron"} |
| 1745 | b.StartTimer() |
| 1746 | for i := 0; i < b.N; i++ { |
| 1747 | bindStruct(DOLLAR, q1, am, mapper()) |
| 1748 | } |
| 1749 | } |
| 1750 | |
| 1751 | func TestBindNamedMapper(t *testing.T) { |
| 1752 | type A map[string]interface{} |
nothing calls this directly
no test coverage detected