(b *testing.B)
| 1037 | } |
| 1038 | |
| 1039 | func BenchmarkContext_Store(b *testing.B) { |
| 1040 | e := &Echo{} |
| 1041 | |
| 1042 | c := &Context{ |
| 1043 | echo: e, |
| 1044 | } |
| 1045 | |
| 1046 | for n := 0; n < b.N; n++ { |
| 1047 | c.Set("name", "Jon Snow") |
| 1048 | if c.Get("name") != "Jon Snow" { |
| 1049 | b.Fail() |
| 1050 | } |
| 1051 | } |
| 1052 | } |
| 1053 | |
| 1054 | type validator struct{} |
| 1055 |