(b *testing.B)
| 109 | } |
| 110 | |
| 111 | func BenchmarkReplaceEntitiesBytes(b *testing.B) { |
| 112 | em := map[string][]byte{ |
| 113 | "entity1": []byte("Entity Value1"), |
| 114 | "entity2": []byte("Entity Value2"), |
| 115 | "entity3": []byte("Entity Value3"), |
| 116 | } |
| 117 | |
| 118 | data := []byte("This is a test string with &entity1;, &entity2;, and &entity3; to be replaced.") |
| 119 | |
| 120 | b.ResetTimer() |
| 121 | |
| 122 | for b.Loop() { |
| 123 | _ = xmlparser.ReplaceEntitiesBytes(data, em) |
| 124 | } |
| 125 | } |
nothing calls this directly
no test coverage detected